Former United States President Barack Obama believes that ballooning wealth inequality is a threat to society, and that those who have the means should help those who are less fortunate.

“Right now I’m actually surprised by how much money I got,” the 44th President said in his address to more than 10,000 people gathered in Johannesburg, South Africa, on Tuesday. “There’s only so much you can eat. There’s only so big a house you can have. There’s only so many nice trips you can take. I mean, it’s enough.” The Obamas made more than $20 million between 2005 and 2016 thanks in large part to two lucrative book deals, according to an analysis by Forbes.

Wealthy people should give money to those who are less fortunate, Obama said in the speech, which was his highest-profile appearance since leaving office. In the years from 2009 to 2015, Obama gave more than $1 million to charities, according to Forbes.

“You don’t have to take a vow of poverty just to say, ‘Well, let me help out… let me look at that child out there who doesn’t have enough to eat or needs some school fees, let me help him out. I’ll pay a little more in taxes. It’s okay. I can afford it,’” Obama said. “I mean, it shows a poverty of ambition to just want to take more and more and more, instead of saying, ‘Wow, I’ve got so much. Who can I help? How can I give more and more and more?’ That’s ambition. That’s impact. That’s influence. What an amazing gift to be able to help people, not just yourself.”

There have been significant improvements in global health and prosperity over the last hundred years, but many have been left behind, the former President said. “While globalization and technology have opened up new opportunities, have driven remarkable economic growth in previously struggling parts of the world, globalization has also upended the agricultural and manufacturing sectors in many countries. It’s also greatly reduced the demand for certain workers, has helped weaken unions and labor’s bargaining power,” Obama said. “And the result of all these trends has been an explosion in economic inequality. It’s meant that a few dozen individuals control the same amount of wealth as the poorest half of humanity. That’s not an exaggeration, that’s a statistic,” he said.

Indeed, 42 people have the same amount of wealth as the poorest half of the world, according to a study released in January by the global charity Oxfam. And 82 percent of the money made in 2017 went to the wealthiest 1 percent of the global population, the report says.

Many of America’s richest agree that extreme wealth inequality is a detriment to the economy. “As the economy evolves, it reallocates resources,” billionaire Berkshire Hathaway CEO Warren Buffett said on PBS Newshour in 2017. “Now, the real problem, in my view, is … the prosperity has been unbelievable for the extremely rich people.” “If you go to 1982, when Forbes put on their first 400 list, those people had [a total of] $93 billion. They now have $2.4 trillion, [a multiple of] 25 for one,” Buffett said. “This has been a prosperity that’s been disproportionately rewarding to the people on top.”

Mark Zuckerberg, the billionaire founder and CEO of Facebook, has expressed a similar sentiment. “We have a level of wealth inequality that hurts everyone,” Zuckerberg said in his May 2017 commencement address at Harvard. “Let’s face it: There is something wrong with our system when I can leave [Harvard] and make billions of dollars in 10 years, while millions of students can’t afford to pay off their loans, let alone start a business.”

Billionaire entrepreneur Richard Branson has said a universal basic income, or a free cash handout from the government to all citizens, should be implemented as a solution to wealth inequality. “A basic income should be introduced in Europe and in America,” Branson told The New York Times in June, responding to the question, “What do you think those in positions of power should do to address social problems like income inequality?” “It’s a disgrace to see people sleeping on the streets with this material wealth all around them,” Branson said.

Read more at CNBC