Charlie Sheen will be back on “Two and a Half Men”

Charlie Sheen just sued Warner Bros. for $100 million. This is getting ugly. How does it work out? When Warner Brothers rehires him and “Two and a Half Men” restarts next season.

This might seem crazy. Like, Charlie Sheen-crazy. But think about it — why did they fire him anyway?

Because he bad mouthed the studio and his boss? Pssh. There are plenty of divas around Hollywood. And there is one reason people are allowed to be divas — when they bring in the money. Like Charlie Sheen does.

“Two and a Half Men” has been the number one comedy on television for seven of its eight season. NUMBER ONE. Not “The Office.” Not “30 Rock.” It’s had critical acclaim in the form of Outstanding Comedy nominations and Emmy nominations for Sheen. But all that matters is that number one designation.

It’s one of the most-watched shows on television. Because of this, it brings in fairly substantial advertising revenue, money needed to offset all the unwatched shows on CBS in the demo (like “Blue Bloods,” “The Good Wife,” etc.).

And since its not a drama or a serial, it repeats really well. So well, that for the last two Mondays, even in repeats, “Two and Half Men” has been one of the top programs for the night.

It does just as well in syndication. Most weeks, “Two and A Half Men” is one of the most-watched syndicated programs. And that’s where Warner Bros. is making its money: syndication.

Warner Bros. foots the bill for the show. It’s the one paying out nearly $2 million per episode to keep Sheen — and the studio that just fired him. Warner Bros. sell each episode to CBS for its first run airing. Given that its one of the top programs, CBS probably pockets some nice advertising change ($200,000+ per 30 second commercial) for the show, and in turn, pays a hefty price to Warner Bros. per episode — likely several million per episode, off setting the cost of production for Warner Bros.

Warner Bros. then banks on syndication to keep “Two and A Half Men” money running forever. Successfully syndicated shows are monster — “Seinfeld” has earned more than $2.7 BILLION in the 13 years since it went off the air. Every episode canceled represents millions of dollars lost to Warner Brothers.

Since “Men” repeats and performs so well in all these aspects, it makes the most financial sense to keep Sheen. This lawsuit is going to cost everyone involved, millions of dollars. Sheen wants the money. And as his lawsuit alleges, Warner Bros. knew what he was like when they signed him to a $90 contract extension last year.

How does this all end? The only way that makes sense for everyone: with Sheen returning to “Two and a Half Men.”