Hide

Problem D
GCD Sum

Given an integer $N$, compute the sum

\[ \sum _{i \mid N} \sum _{j \mid N} \gcd (i, j) \text {.} \]

Here, $\gcd (i, j)$ is the greatest common divisor of $i$ and $j$, and $i \mid N$ denotes that $i$ is a divisor of $N$.

Input

The first and only line contains the integer $N$ ($1 \le N \le 10^{14}$).

Output

Output the sum in the task description.

Sample Input 1 Sample Output 1
6
30
Sample Input 2 Sample Output 2
7
10

Please log in to submit a solution to this problem

Log in