We study the thermodynamics of clean structures composed of superconductor (S) and ferromagnet (F) layers and consisting of one or more SFS junctions. We use fully self consistent numerical methods to compute the condensation free energies of the possible order parameter configurations as a function of temperature T . As T varies, we find that there are phase transitions between states characterized by different junction configurations (denoted as "0" or "π" according to the phase difference of the order parameter in consecutive S layers). We show that these transitions are of first order. We calculate the associated latent heats and find them to be measurable. PACS numbers: 74.45.+c, 74.25.Bt, 74.78.Fk A plethora of new ideas and devices has been emerging from the study of nanostructures as they pertain to the field of spintronics1 . An important part of this development has occurred through the study of the rich and varied phenomena that occur 2 in heterostructures involving superconductors (S) and ferromagnets (F).The physics of such F/S heterostructures is dominated by the proximity effects that arise from the competition between superconducting and magnetic orderings in the materials comprising the structure, with each of the corresponding order parameters penetrating into the other material. These effects follow from normal and Andreev 3 reflection processes at the interfaces. In the latter process, an electron encounters one of the interfaces, is converted into a hole with opposite spin and traverses in the opposite direction. For S/N interfaces (where N is a non-magnetic, non-superconducting metal) the dynamics of charge transport is degenerate with respect to the electron spin quantum variable. This is not true, however, in the case we consider here, where superconducting regions are separated by magnetic interlayers.In SFS trilayers, as well as in multilayers built from a sequence of such structures (SFSFS. . . ), the spinsplitting effect of the magnet produces important and nontrivial changes in Andreev and other scattering processes. The exchange field in the ferromagnet breaks the time-reversal symmetry and generates a superconducting state where the Cooper pairs acquire a finite momentum resulting in a spatial modulation of the superconducting pair amplitude in the F region 4 . Depending on the geometric and material characteristics of the SFS trilayer, its thermodynamic equilibrium state can be a "0" or a "π" state, depending on the value of the phase difference between the superconducting order parameters in the two S electrodes. It is this twofold possibility that lies at the foundation of the many spin-based switching phenomena, which in turn are the basis for devices, including superconducting π qubits 5 and memory elements 6 . For larger SFSFS. . . S type heterostructures the order parameter may or may not flip between any pair of consecutive S layers, leading to a variety of possible configurations, which can be characterized as a sequence of 0 and π junctions.Continual advances in nanopr...