import fractions n = input() if n % 2 == 1: print n else: print fractions.gcd(n, n * (n - 1) / 2)