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 = sum(range(n)) print(euklit(m,n))