It’s not just apples — any kind of fruit might keep the doctor away: Eating fruit daily could protect you from heart disease and stroke, reports the New England Journal of Medicine.

In the study of more than 500,000 adults in China, researchers found that those who consumed fruit daily were 40 percent less likely to die from heart disease than those never or rarely ate fruit.

They were also 34 percent less likely to have a heart attack, and 36 percent less likely to experience an ischemic stroke, the most common kind of stroke that occurs when blood flow to the brain becomes blocked.

And it doesn’t take much fruit to make a difference: The people who consumed the most fruit were only taking in an average of about 170 grams a day.

That’s slightly less than a medium-sized apple, which clocks in at 182 grams, according to the USDA Nutrient Database.

Researchers aren’t sure of the exact reason why fruit is so beneficial.

But what they do know, however, is that it’s a rich source of potassium, fiber, folate, antioxidants, and phytochemicals, which have each been shown to protect the heart, says study author Huaidong Du, Ph.D., of the University of Oxford.

Of course, people who eat more fruit may tend to have healthier diets overall and exercise more frequently—two other heart-healthy habits—but researchers controlled for those factors in their analysis.

Since the link remained even after adjusting for those factors, it’s likely that there is something specific about fruit that’s responsible for protecting your heart.

The takeaway? Fit at least one serving of fruit in your diet every day, Dr. Du says. To hit the average the study participants consumed, that would be about one medium apple, one medium pear, 9 large strawberries, or 1 cup cubed cantaloupe.