N = int(input()) M = (N-1)*N//2 if M==0: M=1 for x in range(M, 0, -1): if M % x == 0: break print(x)