Everyone is correct.Foam is to keep the boat floating high enough in the water to bail out when it swamped.I have used pink or blue insulating foam glued together with 3M 5200 marine sealant and wrapped in clear shrink wrap.The shrink wrap helps if you make blocks out of the builders foam.Keeps it together and helps block water absorption.I can't remember the formula for figuring out how much foam is needed per pound,but it isn't much.
Foam is structural in some fiberglass boats.Thought I'd add that for the guys that also have glass boats.