A system's thermal energy decreases by 20 J while the system performs 10 J of work. How much heat was added to the system?