Bob Bakish, who was designated to be CEO of the combination of Viacom and CBS, could earn $31.5 million a year running the new media company.

According to documents filed with the Securities and Exchange Commission, Bakish, who had been running Viacom, signed a new contract on Aug. 13 that calls for him to get a base salary of $3.1 million a year. He will also get $16 million in equity grants plus the target for his annual cash bonus is $12.4 million.

When the transaction closes, Bakish will receive a one-time grant of restricted stock units worth $5 million.

Related: CBS All Access and Pluto TV to Be ‘Complementary’ in New Viacom-CBS Alignment

Joe Ianniello, who had been acting CEO of CBS and will be chairman and CEO of the CBS branded assets owned by ViacomCBS, also signed a new agreement. Ianniello’s deal with CBS was set to expire Dec. 31.

He will get 450,000 restricted stock units as an inducement to stay on with the new company and is relieved of any requirement to consult with the company if he leaves.

The new deal runs through at least Feb. 1, 2020 and the company may extend the term at 30-day increments through May 13, 2020. Ianniello will get a $1 million monthly extension fee under terms of the agreement.

He will continue to receive the salary and bonuses he agreed to under his CBS contract, which also called for a $70 million payment when he departs.

Other CBS and Viacom executives are covered by a retention plan.

The agreement calls for Viacom to pay CBS a termination fee of $373 million if its pulls out of the deal. If CBS terminates, it will have to pay Viacom $560 million.

Related