eolymp
bolt
Try our new interface for solving problems
Problems

Factorization 2

Factorization 2

Let $n = p_1^{a_1}p_2^{a_2}...p_k^{a_k}\:(p_1 < p_2 < ... < p_k)$ be a factorization of positive integer $n$. Find the value of $p_1 + p_2 + ... + p_k$. \InputFile One positive integer $n\:(1 < n \le 10^9)$. \OutputFile Find the factorization of $n$ and print the value of $p_1 + p_2 + ... + p_k$. \Examples For example, $72 = 2^3 \cdot 3^2$. The answer is $p_1 + p_2 = 2 + 3 = 5$.
Time limit 1 second
Memory limit 128 MiB
Input example #1
72
Output example #1
5
Input example #2
60
Output example #2
10