A piston-cylinder device with a set of stops initially contains 1.0 kg of steam at 1.0 MPa and 400°C. Determine the compression work if the final state is 500 kPa.