Two moles of a monatomic ideal gas are contained at a pressure of 1 atm and a temperature of 300K. 34166 joules of heart are transfered to the gas, as a result of which the gas expands and does 1216 joules of work against its surroundings. The process is reversible. Calculate the final temperature of the gas.