import math N = int(input()) a = N b = int(N * (N + 1) // 2) ans = math.gcd(a, b) print(ans)