Apply the specific heat equation:
q= mcΔT
q= heat energy
m= mass = 500g
c = specific heat capacity = 4.186 J/gC
ΔT= change in temperature = 30°
q= 500g x 4.186 J/gC x 30 C = 62,790 Joules
Then apply the latent heat formula:
q= mL
L = latent heat fusion, vaporization, etc for the substance = 334 J/g
q = 500 x 334 J/g = 167,000 J
Total q = 62,790 + 167,000 = 229,790 J