def main(N): if N % 2 == 1: return 1 return N // 2 + 1 n = int(input()) print(main(n))