A piston-cylinder containing 1 kg air at 500°C and 500 kPa is connected to a Carnot heat engine where the environment is 25°C and 100 kPa. The piston-cylinder system expands to 200°C and 100 kPa. How much work did the Carnot engine produce? Show your work.