main = readLn >>= print . (\x -> if odd x then x else div x 2)