A sample of dry air has a temperature of 300 K, a volume of 3 liters and a pressure of 4 atmospheres. The air then undergoes the following changes: (a) it is warmed under a constant pressure to 500 K, (b) it is cooled under constant volume to 250 K, (c) it is cooled under constant pressure to 150 K, and (d) it is warmed under constant volume to 300 K. Calculate the total work done.