For a given calculate the value of , where
Here GCD(i, j) means the greatest common divisor of integers and .
For those who have trouble understanding summation notation, the meaning of is given in the following code:
g = 0;
for (i = 1; i < n; i++)
for (j = i + 1; j <= n; j++)
g += gcd(i, j);Consists of no more than lines. Each line contains one integer (1 < n \le 4 \cdot 10^6). Input is terminated by a line containing a single zero and should not be processed.
For each input number print in a separate line the corresponding value of . The value of fits in a -bit signed integer.
Example 1