M grams of steam at 100°C is mixed with 200 g of ice at its melting point in a thermally insulated container. If it produces liquid water at 40°C [heat of vaporization of water is 540 cal/ g and heat of fusion of ice is 80 cal/g], the value of M is______.