There's good news for those who have gotten a bit sedentary lately. You can undo the damage, and it doesn't take a major fitness program. A study that tracked thousands of men for a over a decade found that simply walking 20 minutes a day can markedly reduce your risk of heart failure.

Even better, the study suggests that when it comes to preventing heart failure, what you do now is more important than what you've done in the past. In fact, being fit in your 30s is not going help you in your 60s if you are a total couch potato.

Heart failure is a condition where the heart can't pump as much blood as the body needs. While not necessarily fatal, heart failure does reduce both lifespan and quality of life.

Researchers tracked over 33,000 Swedish men from 1998 until 2012 or until their first incidence of heart failure. When enrolling in the study, at an average age of 60, the men completed a questionnaire about their level of activity at work and at home, as well as estimating their walking, bicycling and other exercise in the previous year and back when they were 30 years old.

Your heart has a short memory. It only wants to know what you've done for it lately.

Men who were active at the age of 30, but not at 60, did not have a decreased risk of heart failure. It was as if their heart had a short memory and only wanted to know what each man had done for it lately.

Walking and biking appeared to be more beneficial than other types of exercise. Men who reported walking or biking for 20 minutes a day or more when they joined the study had a 21% lower risk of heart failure, the largest reduction seen in this study for any type of physical activity. And if some in this group did get heart failure, they were, on average, eight months older than the other men in the study were when they got it. So even if walking and cycling can't prevent heart failure, you can delay it.

People who engaged in moderate levels of activity fared better than those who engaged in the most or the least physical activity. Those engaged in the lowest and the highest levels of physical activity had a greater risk of heart failure than those in the middle — 47% and 51% higher respectively.

Like most things in life, apparently it's not only bad to get too little exercise, it's also bad to get too much. The authors suggest that heavy physical activity, such as long distance running or manual labor, may put stress on the body, which in turn has adverse effects on the heart.

Judging from earlier studies, while getting too much exercise might be a problem for some people, it's hardly a national problem.

The study appears in the Journal of the American College of Cardiology: Heart Failure.