N = int(input()) if N == 1: print(0) exit() def factorization(n): if n == 1: return [[1, 1]] temp = n ans = [] for i in range(2, int(n**0.5+1.01)): if temp % i == 0: ct = 0 while temp % i == 0: temp //= i ct += 1 ans.append([i, ct]) if temp != 1: ans.append([temp, 1]) return ans d = factorization(N) ans = 0 for p, c in d: ans += p*c print(ans)