def f(n)
    if n.odd?
        1
    else
        n / 2 + 1
    end
end

puts f(gets.to_i)