Older, population II stars have substantially less metallicity than the younger, population I stars due to the composition of the molecular clouds from which they formed. Over time, such clouds become increasingly enriched in heavier elements as older stars die and shed portions of their atmospheres. Post–main sequence As stars of at least 0.4 exhaust the supply of hydrogen at their core, they start to fuse hydrogen in a shell surrounding the helium core. The outer layers of the star expand and cool greatly as they transition into a red giant. In some cases, they will fuse heavier elements at the core or in shells around the core. As the stars expand, they throw part of their mass, enriched with those heavier elements, into the interstellar environment, to be recycled later as new stars. In about 5 billion years, when the Sun enters the helium burning phase, it will expand to a maximum radius of roughly , 250 times its present size, and lose 30% of its current mass. As the hydrogen-burning shell produces more helium, the core increases in mass and temperature. In a red giant of up to 2.25 , the mass of the helium core becomes degenerate prior to helium fusion. Finally, when the temperature increases sufficiently, core helium fusion begins explosively in what is called a helium flash, and the star rapidly shrinks in radius, increases its surface temperature, and moves to the horizontal branch of the HR diagram. For more massive stars, helium core fusion starts before the core becomes degenerate, and the star spends some time in the red clump, slowly burning helium, before the outer convective envelope collapses and the star then moves to the horizontal branch. After a star has fused the helium of its core, it begins fusing helium along a shell surrounding the hot carbon core. The star then follows an evolutionary path called the asymptotic giant branch (AGB) that parallels the other described red-giant phase, but with a higher luminosity. The more massive AGB stars may undergo a brief period of carbon fusion before the core becomes degenerate. During the AGB phase, stars undergo thermal pulses due to instabilities in the core of the star. In these thermal pulses, the luminosity of the star varies and matter is ejected from the star's atmosphere, ultimately forming a planetary nebula. As much as 50 to 70% of a star's mass can