Jimmy needs to compute a function f(x, y), where and are integers from to . If he knows f(x, y), he can easily derive f(k \cdot x, k \cdot y) for any integer by applying simple calculations to f(x, y) and .
Note that the function is not symmetric, so f(x, y) cannot be derived from f(y, x).
For example, if n = 4, Jimmy initially needs to know out of the possible input pairs:

The remaining values can be derived from the already known ones:
f(2, 2), f(3, 3), and f(4, 4) from f(1, 1);
f(2, 4) from f(1, 2);
f(4, 2) from f(2, 1);
The input consists of at most lines. Each line contains one integer (1 \le n \le 50000). The last line contains and should not be processed.
For each input value of , output on a separate line the minimum number of function values Jimmy needs to know to compute all n^2 values f(x, y).
Example 1