A reaction occurs in a closed container that releases 950 J…

A reaction occurs in a closed container that releases 950 J of heat into the surroundings. As the reaction proceeds, the product falls out as a solid and causes the container to contract. This results in the surroundings performing 220 J of work on the system. What is the change in internal energy (in kJ)?