From the script:
Muffley (Merkin Muffley, the US President, played by Peter Sellers):
But this is absolute madness, ambassador. Why should you build such a thing?
DeSadeski (Russian Ambassador):
There are those of us who fought against it, but in the end we could not keep up with the expense involved in the arms race, the space race, and the peace race. And at the same time our people grumbled for more nylons and washing machines. Our doomsday scheme cost us just a small fraction of what we'd been spending on defense in a single year. But the deciding factor was when we learned that your country was working along similar lines, and we were afraid of a doomsday gap.