Air is compressed steadily in a compressor from 100kPa and 300 K to 1 Mpa and 500 K. The compressor is not well insulated and a heat loss of 40 KJ/kg occurs during the process. Assuming the changes in kinetic and potential energies are negligible, determine the specific work input to the compressor, in kj/kg.