Three moles of an ideal monatomic gas are at a temperature of 396 K. Then 2438 J of heat is added to the gas, and 897 J of work is done on it. What is the final temperature of the gas?