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