50 joules of energy are transferred out of a system. The energy is lost through heat, mechanical, and electrical energy took up 15 j and electrical energy took up 10 j, how many joules were lost through heat energy?