The energy that must be removed from a substance in order to decrease its temperature by

is given by

where
m is the mass of the substance

is its specific heat capacity

is the variation of temperature
In our problem, m=500 g=0.5 kg,

and the variation of temperature is

which corresponds to 25 K, since the differences in temperature are equals in Kelvin and Celsius. Therefore, the amount of energy that must be removed from the block of ice is

where the negative sign means the energy is removed from the system.