Getting the recommended amount of physical activity may help avoid brain fog while undergoing chemotherapy for breast cancer, according to a study in the Journal of Clinical Oncology.

Up to three quarters of people with breast cancer report cognitive impairment during chemotherapy. Symptoms of so-called chemo brain may include confusion, poor memory and difficulty concentrating, and they sometimes last long after treatment ends.

Elizabeth Salerno, PhD, MPH, of the National Cancer Institute, and colleagues studied the link between exercise and cognition in 580 people with Stage I to III breast cancer. They found that those who met minimum physical activity guidelines before and during chemotherapy had better cognitive function immediately and for six months after treatment. What’s more, people who previously had an active lifestyle and exercised throughout chemotherapy had the best cognitive performance.

Federal guidelines recommend at least 150 minutes of moderate-intensity activity or 75 minutes of vigorous activity each week plus muscle-strengthening activities. Getting enough exercise while undergoing treatment can be a challenge due to fatigue and other side effects, but any amount of physical activity is better than none. “Being physically active can actually help reduce fatigue and help with anxiety and depression, and it can improve physical function,” says Salerno.