A TV show costs $100,000 per episode for the first season and twice that much for every other season.  The first season had 12 episodes, and every season after that had 50% more episodes except the last season, which had 24 episodes.  The show had 5 seasons.  How much did it cost to produce all the episodes?
What is the solution?