n = int(input())
if n % 2 == 1:
    ans = 1
else:
    ans = n // 2 + 1
print(ans)