A gas is expanded from an initial state to a final state along a path that consists of (a) an isothermal expansion doing 40 J work, (b) an adiabatic expansion doing W work, (c) an isothermal expansion doing 30 J work. If the total change in the internal energy of the gas is -20 J, the work done by the gas during the adiabatic expansion W =