By Chris Isidore | CNN Business

The three top Twitter executives Elon Musk fired Thursday will walk out the door with about $187 million of Musk’s money.

Former CEO Parag Agrawal, former CFO Ned Segal and former chief legal officer Vijaya Gade were ousted after Musk took control of the company late Thursday, according to a source familiar with the situation.

They would have received much of that money even if they had stayed on board under the new ownership — they and the other shareholders would receive payouts from Musk after he bought their shares for $54.20 each.

Agrawal who only assumed the title of CEO just under a year ago, it had the smallest stake of the three: 155,000 shares worth $8.4 million at the price Musk paid. Segal will receive $22 million for the 406,000 shares he owns, while Gade will walk away with $34.8 million for his 642,000 shares.

Elon Musk will have to pay three fired Twitter executives nearly $200 million