GCD Extreme#1147

GCD Extreme

2 seconds
64 megabytes
Easy

Given , compute the value of , where

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

For clarification, the meaning of can be represented by the following code:

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

Input

The input file contains at most lines. Each line contains a natural number (1 < n < 200001). The last line contains n = 0 and is not processed.

Output

For each input line, output one line containing the corresponding value of for the given . The value of fits in a -bit signed integer.

Examples

Example 1

Loading
Loading