N = int(input()) if N == 1 or N == 2: print(N) elif N == 3 or N == 4: print(N-1) else: print((N-1) // 2)