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