let n = stdin.ReadLine () |> int

if n % 2 = 0 then
    n / 2 + 1
else
    1
|> printfn "%d"