-- yukicoder My Practice -- author: Leonardone @ NEETSDKASU main = readLn >>= print . f where f x | m == 0 = d | otherwise = x where (d, m) = divMod x 2