n = int(input()) def euklit(a,b): if a < b: a, b = b, a while b != 0: a, b = b, a % b return a m = n*(n-1)//2 print(euklit(m,n))