You already know that regularly hitting the gym keeps you looking and feeling your best. But the tough workouts you do in your youth could also help you stay healthy later in life, according to a new study published in the journal Menopause.

 Researchers found that one of the factors in height loss after menopause—a common occurrence, but one that’s been connected to a higher risk of disease and death—is the amount of exercise women got when they were teenagers. Women who did strenuous workouts regularly when they were young lost less height than those who didn’t, the study found.
“Having done strenuous exercise regularly, at least three times a week, in their teens was protective for later life height loss in our study,” SUNY professor and study senior author Jean Wactawski-Wende, PhD, said in a press release.

Researchers measured the heights of more than 1,000 women, then measured them again five years later. The women lost an average of 0.4 inches over the five-year period. The 70 women who lost over an inch of height were older, weighed more at baseline, and took more corticosteroids, which are known to cause osteoporosis.

The connection between physical activity and height after menopause is likely the fact that exercise helps build stronger bones, according to the press release.

“Although this study was done on postmenopausal women, there is a key message for younger women: strenuous exercise in teenage years has lasting effects on your bones later in life,” says Wactawski-Wende.