import math n=int(input()) print(math.gcd(n,n*(n-1)//2))