No need to use the expensive stuff, just any old builders expansion foam from Bunnings will do the job.
We had an old trawler with extensive leaking problems [like need to fix right now!]
and they just used the foam anywhere they could see water coming in.
When the boat was craned out it had foam expanding out all over the place from between the planks, but it did stop the leaks!!!
I think the owner was shocked at the amount of foam hanging outside the boat!
Gotta smile at the quick thinking