Tropical storm leaves 54 dead as it exits Philippines