Your own comment agreed that calories aren't usually the critical problem, though. Fruit and vegetables are generally associated with good mental function because of the micro- / phyto-nutrient content. You can eat all the grain and meat you can afford and still be missing essential nutrients.