More than 18,000 athletes – representing an astounding 207 countries – called the Olympic Village home this month. For the past few weeks, the Olympic Village has also provided proper nourishment so that competitors can perform to their gold standard. That means creating healthy, well-balanced meals day in and day out. Because many athletes require high-calorie meals, chefs needed about 250 tons of raw ingredients to feed that many bellies. But as someone who’s worked in the food industry for a long time, Italian Chef Massimo Bottura knew food would still go to waste.

a comida chegou! e imaginar que tudo isso seria desperdiçado // food has arrived! imagine it would be wasted #zerowaste #desperdiciozero

A photo posted by Refettorio Gastromotiva (@refettoriogastromotiva) on

So nine months before the Olympics began, Bottura teamed up with Brazilian chef David Hertz so that once the games kicked off, the excess food didn’t end up in the trash. They dreamt up Refettorio Gastromotiva – which takes its name from the Italian translation of dining hall – to feed a group of homeless people each day. Hertz ended up persuading Rio’s mayor to donate an empty lot to house their restaurant, and Bottura raised the $250,000 necessary to make it a reality. “This is not just a charity; it’s not just about feeding people,” Bottura told The New York Times. “This is about social inclusion, teaching people about food waste and giving hope to people who have lost all hope.”

prontos para os convidados / ready for our guests #mesaparatodos

A photo posted by Refettorio Gastromotiva (@refettoriogastromotiva) on

50 chefs – including Alain Ducasse, Virgilio Martínez Véliz, and Joan Roca – signed on to provide this invaluable service. Taking turns, they create meals out of whatever’s given to them: day-old bread, bruised tomatoes, and other slightly imperfect foods that didn’t make it to Olympians’ plates for one reason or another.

Bottura – whose restaurant ranked No. 1 on the World’s 50 Best Restaurants this year – doesn’t want his relationship with Rio to end once the games are over this weekend. Since the Lapa location has a 10-year lease, he plans to change things up slightly. Instead, the refettorio will become a lunch spot by Bottura’s Food for Soul organization. It will feed paying customers in the afternoons, and then it will use those profits to provide free meals to 108 people at night. “This is not some pop-up project,” Bottura said.

Muito obrigado @refettoriogastromotiva! Parabéns a todos os envolvidos

A photo posted by Alex Atala (@alexatala) on

It’s a thoughtful gesture made even sweeter by the fact that Bottura has included Brazilian chefs. Last Thursday, for example, Alex Atala cooked in the restaurant. It’s this kind of restaurant that’s right up Atala’s alley. On Atala’s Chef’s Table episode, the cook talked about respecting food and his connection to nature. So it makes sense that he’d jump at a chance to participate in Refettorio Gastromotiva. “We are a generation of young chefs who are not competing with each other, but who want to share,” Atala said.

And Bottura also chose to team up with Hertz, who has dedicated the last 10 years to teaching disadvantaged people how to work in the kitchen.