N = int(input()) a = 0 b = 1 for i in range(1, N + 1): if N % i == 0: a += i b *= i c = 0 for i in range(1, N + 1): if N % i == 0: c += (b // i) print(a * b // c)