module Main where type Input = Int type Output = Int parse :: String -> Input parse = read solve :: Input -> Output solve input | odd input = 1 | otherwise = input `div` 2 + 1 render :: Output -> String render = show main :: IO () main = interact ( render . solve . parse )