$/=words;say ($0/[gcd] $/)-1