Buddhika Weerasinghe/Getty

An apple a day keeps the stupid away.

Today, the human brain is a powerhouse of logical thought — but it wasn’t always this way. Our primate ancestors spent nearly 65 million years developing our brains, and a new study suggests that fruit may have played a big role in that.

First, a bit of background: Part of the reason humans are so intelligent is that we have incredibly large brains compared to the rest of our bodies. In fact, our noodles account for 2% of our entire body weight. An elephant’s brain, on the other hand, is less than one-tenth of one percent of its body weight.

So how did our brains get to be so powerful?

A team of anthropologists at New York University published a study on March 27 suggesting that our monkey ancestors’ fruit-eating habits are part of the reason that us humans got to be so dang clever.

The researchers originally focused on how monogamy affected brain size. The running theory within the scientific community is that monogamy — because it requires some self-restraint not to go fuck every other monkey they see — leads to a more developed brain.

The anthropologist team didn’t find enough evidence to support that hypothesis. What she did find, however, was that fruit eaters had larger brains than primates who subsisted just on leaves.

Chung Sung-Jun/Getty

The study puts forward some ideas for why this might be. First, leaves are infinitely more abundant than fruit. So a primate that subsisted on leaves alone would be able to eat whenever and wherever they wanted. A primate with a fruit-based diet, on the other hand, would need to remember the specific location of where the fruit was.

Second, many fruit-eating primates had to resort to what’s called “extractive foraging.” This is the process of using logical thinking to get to the edible part of a plant, such as peeling a banana or cracking a nut. It takes a relatively big amount of brain power to pull off — or more than grabbing a handful of leaves, anyways.

Finally, the study’s authors theorize that fruit eaters see a higher rate of return when it comes to digesting their food of choice. Leaves may be plentiful, but they’re quite dense and therefore require a lot of energy to digest. Primates that eat leaves often have to lie down for hours at a time to devote all their energy to processing those chewy-ass leaves.

Fruit, on the other hand, is relatively light and breaks down quickly. The anthropologist team points out that this “enhanced diet quality for energy” can increase the development of the brain.

While social structures most likely still played a major role in primate brain development, it’s clear that diet was also a contributing factor. So make sure to snag an extra orange before going to work — your descendants will thank you.