With the recent controversy over the health benefits of fish oil and other wellness strategies, it can be reassuring to know that one thing remains constant: Exercise is good for your body. Any movement, even walking, brings about a host of cardiovascular effects that can help you live longer, feel better, and not run out of breath when chasing children or small animals.

The question of how much exercise is best, though, is open to debate. The answer often depends on your goals. For heart health, sessions four to five times weekly might be ideal. For mental health? As The Independent reports, scientists believe there’s a pretty specific prescription: Exercising for 45 minutes three to five times a week.

The data comes from a new and expansive observational study published in The Lancet Psychiatry and conducted by researchers at Yale and the University of Oxford. The study examined 1.2 million subjects who filled out the Behavioral Risk Factor Surveillance Survey at two-year intervals between 2011 and 2015. Subjects who didn’t exercise at all had an average of three-and-a-half days per month when they felt mentally unwell—stressed, depressed, or otherwise burdened by emotional problems—while those who exercised regularly reported an average of just two days.

The study found that a regimen of three to five 45-minute sessions a week was optimal for reducing the reported instances of feeling stressed or depressed. Exercising for longer periods—some subjects reported exceeding 90 minutes in the gym—was associated with a drop-off in mental health benefits. Subjects who spent three hours at a time exercising actually reported an increase in depressive symptoms, a possible consequence of having obsessive personality traits that could influence their overall psychological state.

Researchers also found that the kind of exercise undertaken made a difference. While all varieties helped, people who participated in team sports promoting social interaction and gym classes like cycling or aerobics described greater self-satisfaction with mental health.

Because the study involved self-reported outcomes and exercise wasn't monitored, it's possible that the participants could have misinterpreted the volume of exercise performed. The scope of the study, however, makes a convincing case for a popular notion: If exercise were a pill, doctors everywhere would be prescribing it.

[h/t The Independent]