def gcd(x, y): if x < y: x, y = y, x while y > 0: r = x % y x = y y = r return x n = int(input()) n1, n2 = n, n * (n-1) // 2 print(gcd(n1, n2))