By the numbers, humans produce a lot of food—enough to provide every person on Earth 2,750 calories per day, exceeding almost all dietary recommendations.

There’s one glaring problem, however: Humans aren’t producing enough of the right food.

When researchers at the University of Guelph in Canada broke those calories down into different food groups, they found a shortage in production of the most important foods. In the long run, with the global population expected to balloon to about 10 billion people by mid-century, this could cause some serious problems.

More specifically, the researchers say that while most nutrition models recommend that fruit should comprise about 40% of a person’s daily diet, fruit only accounts for 28% of global production. And a lot of the vegetables farmers grow—about 40%—are starch-heavy potatoes that don’t contain many of the nutrients dietitians say people need. In China, the US, and across Africa, a lack of proper nutrition has created a slew of health problems, including Type 2 diabetes.

In looking at possible solutions to this agricultural problem—while taking into account the deleterious effects of greenhouse-gas emissions on the planet—the researchers came up with three scenarios.

1. Use the land better

Some of the Earth’s arable land is used for large-scale crops, some for animal agriculture, and some for specialty crops. Striking a balance between them is the challenge.

In the past, some researchers have used such high-level, theoretical research opportunities to draw controversial conclusions about the benefits of switching whole populations to vegan and vegetarian diets. That’s not the case in this most recent study, in which the researchers say outright that animal agriculture should continue to exist, albeit on a smaller scale, with more efficient practices.

“Livestock plays an important role in many agro-ecosystems, 987 million people worldwide depend on raising animals as a key livelihood strategy, and much pasture land is ill suited to crop production,” the researchers wrote. “In parts of the world where malnutrition is still prevalent, increased consumption of livestock products can help improve the well-being of the rural poor.”

The researchers say that even if the planet adopted food-production methods to match dietary recommendations—mostly by planting more high-protein legume crops—there would still be serious environmental consequences due to soil loss, greenhouse-gas emissions, and biodiversity loss. However, if legume cropland were expanded and livestock production simultaneously decreased, it would be possible to strike a balance, they write. In general, though, how humans choose to use the land matters. For that reason, they emphasized the production of less traditional sources of protein, including through algae, fungi, and insects.

2. Turn to tech

Another way to deliver the needed nutrients is to lean into agricultural technology. It’d be a tall order. Across the past five decades, technological advancements have increased food yields by about 1% each year. If humans were to switch to a diet based on actual dietary recommendations and also account for the growing population, technology would have to increase yields of fruits and vegetables at a rate of about 8% each year.

“Increasing production of fruits and vegetables, without increasing the amount of arable land used by agriculture might also be achieved, in part, through urban agriculture innovations in vertical farming, indoor production facilities driven by LED lighting, and hydroponics, and other advanced horticultural production technologies,” the researchers write.

3. Reduce waste

Finally, the researchers suggested tackling food waste as a means to ensure more important nutrients make it into the diets of people who need them. According to ReFED, which tracks food waste and policies to alleviate it, an $18 billion effort to achieve a 20% reduction in food waste would save 1.8 billion meals and reclaim the 1,250 calories of food per capita that goes into landfills each year. That would be enough to feed America’s food insecure population three times over, according to its findings.

And in terms of land use, if global food waste were cut in half, it would require the use of much less physical space to meet the nutritional requirements of the planet’s population. A population of 10 billion could be fed with just 899 million hectares. Without addressing food waste, the researchers say that number would about 1 billion hectares.