import sys from typing import Counter readline=sys.stdin.readline write=sys.stdout.write N=int(readline()) if N%2: ans=1 else: ans=N//2+1 print(ans)