import H36

toitient :: Integer -> Integer
toitient n = foldr (\(y,_) x -> x * (y-1) `div` y) n (primeFactorsMult n)