main :: IO () main = print . (\n -> if odd n then n else div n 2) =<< readLn