main = do n <- readLn print $ if n == 2 then 1 else if n `mod` 2 == 1 then n + 1 else n `div` 2 + 1