def factors(n): f = [] c = 0 while n % 2 == 0: n //= 2 c += 1 if c > 0: f.append((2, c)) lim = int(n**0.5 + 0.1) for p in range(3, lim + 1, 2): c = 0 while n % p == 0: n //= p c += 1 if c > 0: f.append((p, c)) if n != 1: f.append((n, 1)) return f N = int(input()) ans = 1 for (p, x) in factors(N): ans *= sum(p**i for i in range(x + 1)) print(ans)