In a thermodynamic process, pressure of a fixed mass of gas is changed in such a manner that the gas releases 20 joule of heat and 8 joule of work was done on the gas. If the initial internal energy of the gas was 30 joule, then the final internal energy will be :