N=int(input()) if N%2: print(1,end="") else: print(N//2+1,end="")