Cryptography club member Rafid is exploring number properties. First exercise: compute the sum of all divisors of a given number. Read N. Print the sum of all divisors of N (including 1 and N itself), computed in O(sqrt(N)).
Input
One integer N.
Output
Sum of divisors of N.
Constraints
1 ≤ N ≤ 10^12
Sample Input
28
Sample Output
56
main.c
Loading editor…
Write C, then Run (custom I/O) or Submit (sample tests). ⌘/Ctrl+Enter submits.