Hi,
When you ask how big the foam has to be, I presume you're referring to the thickness. 3mm will be fine. Depth wise, it should extend forward from the lip surrounding the fresnel focussing screen to the edge of that surface (where there is a tiny grub screw in the centre). The width as manufactured is the same as the fresnel screen. I've never found that cutting the foam with a scalpel is very satisfactory as the adhesive layer seems to make the scalpel drag and the sides of the strip end up anything but parallel. A small pair of sharp scissors is far more successful. When scraping off the residue of the original foam, hold the camera upside down so that the sticky bits don't fall on to the focussing screen. After scraping, a cotton bud and lighter fluid should get rid of the last bits of adhesive. Be prepared for the first attempt not to be 100% successful. If it takes two or three goes, it doesn't matter.
I've always liked the KM, a worthy bayonet mount replacement for the Spotmatic F. Good luck!
Steve