def gcd(*numbers: int) -> int: if len(numbers) == 1: return numbers[0] if len(numbers) == 2: a, b = numbers if a < b: a, b = b, a while True: if a % b == 0: return b a, b = b, a % b first_gcd = gcd(*numbers[:2]) return gcd(first_gcd, *numbers[2:]) def main(): N = int(input()) if N == 1: print(1) return print(gcd(N, (N-1)*N//2)) if __name__ == "__main__": main()