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