Depression sucks. But what if there was an all-natural way to combat its side effects, and maybe a way to even prevent it from happening in the first place? The results from a new study performed in the U.K. has added to the growing evidence that exercise really can fight depression—and even make you less likely to develop it in the first place.

So how does exercise affect one’s brain?

According to Dr. Madhukar Trivedi, a professor of psychiatry at UT Southwestern Medical Center, “We don’t know how exactly exercise helps, but that’s not so strange in the world of depression. In fact, we don’t really understand the exact mechanism involved in a lot of antidepressants.” However, it is noted that a lot of what we do know about exercise is derived from animal studies. Dr. Trivedi also notes that one potential cause that seems especially promising is related to neurogenesis, or the growth of new neurons in the brain.

According to this theory, new neurons are normally produced in a part of the brain called the hippocampus – this is necessary to maintain a person’s proper mood control. However, studied of depressed individuals have shown that they tend to have smaller-sized hippocampi. Researchers think it might be because they’re not producing enough new neurons. The good news is that, according to a 2006 review in the Journal of Psychiatry and Neuroscience, exercise is thought to provoke the production of new neurons by expanding the levels of different endorphins – this is what is believed to help diminish depressive symptoms.

Great! If exercise is like a prescription, then what’s my dosage?

A 2013 study performed by Dr. Trivedi reveals that you should set aside three to five times a week for aerobic exercise, and make sure you’re sweating for about 45 to 60 minutes a session – keeping your heart rate between 50-85% of its maximum rate. If you’re not so much of a runner and more of a weight lifter, shooting for three sets of eight reps, at a weight that’s 80 percent of your 1 rep max is the goal to aim for.