GCD Super-Extreme#1230

GCD Super-Extreme

1 second
256 megabytes
Easy

Given the value of , you must compute the value of . The definition of is given below:

Here, \mathrm{GCD}(i, j) means the greatest common divisor of integers and .

For those unfamiliar with the summation notation, the computation of according to the formula is described by the following code:

G = 0; for (i = 1; i < n; i++) for (j = i + 1; j < n; j++) G += GCD(i, j); /* Here GCD() is a function that finds the greatest common divisor of two integers */

Input

The input file contains up to lines. Each line contains a single integer (1 < n < 4000001). The meaning of is given in the problem statement. The input is terminated by a line containing a zero. This line should not be processed.

Output

For each line of input, output a separate line containing the value of for the corresponding . It is guaranteed that the value of fits in a -bit signed integer.

Examples

Example 1

Loading
Loading