import math print((lambda x: math.gcd(x, x * (x - 1) // 2))(int(input())))