Send a Table#1563

Send a Table

1 second
128 megabytes
Very easy

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:

Input

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.

Output

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).

Examples

Example 1

Loading
Loading