A certain mass of gas is taken from an initial thermodynamic state A to another state B by process I and II. In process I the gas does 5 joules of work and absorbs 4 joules of heat energy. In process II, the gas absorbs 5 joules of heat. The work done by the gas in process II (see figure) is