The same diet that doctors recommend for dodging heart disease also may help preserve brain tissue, a new study finds.

Researchers scrutinized diet surveys from more than 4,200 people with an average age of 66 and ranked the quality of their diets on a scale of 0 to 14. A score of 14 was healthiest and included lots of fruits and vegetables, whole grains, nuts, dairy, and fish, but limited sugar. The volunteers provided data on other factors that might affect brain size, such as blood pressure, physical activity, and smoking. They also underwent brain scans to measure their brain size.