import math n = int(input()) print(1 if n%2!=0 else n // 2 + 1)