n=input() def ea(a,b): a,b=max(a,b),min(a,b) if b==0:return a return ea(b,a%b) print ea(n,n*(n-1)/2)