The heat required to bring the 5 grams of ice from minus 20 degrees Celsius to 0 degrees Celsius is 5 grams multiplied by 0.5 calories per gram degree Celsius multiplied by 20 degrees Celsius, totaling 50 calories. The heat released by the 5 grams of water cooling from 30 degrees Celsius to 0 degrees Celsius is 5 grams multiplied by 1 calorie per gram degree Celsius multiplied by 30 degrees Celsius, totaling 150 calories. Because the water can provide 150 calories but only 50 calories are needed to bring the ice to its melting point, the remaining 100 calories would melt 1.25 grams of ice, which requires 80 calories per gram. Since the available heat is sufficient to melt the ice but the heat balance occurs exactly at the melting point, the final equilibrium temperature of the mixture is 0 degrees Celsius.