France figured out how to make its grocery stores feed even more people.

What happens to the apples that no one buys at the grocery store?

You’ve been there: looking at apples (or other produce) and examining what’s in front of you before deciding on “the one.” The first apple you grabbed wasn’t ripe enough, and the second one had a weird shape. The third was too mushy. But that last one? It was perfect. Into the cart and on you go.

But what happens to the apples and the other food you didn’t buy and no one else did either? Too often, that perfectly good, unsold food ends up in the trash.

That’ll soon be changing in France.

Instead of discarding food items that are approaching their sell-by date, French supermarkets will be required to donate the food to charities or to turn it into animal feed or compost.

On the heels of the Paris climate change agreement, France is hoping to find a solution that helps the hungry while also helping the environment.