Number Theory#429

Number Theory

1 second
128 megabytes
Medium (≈1350)

For the given positive integer n find the number of integers m, such that 1 ≤ m ≤ n, gcd(m, n) ≠ 1 and gcd(m, n) ≠ m. gcd is an abbreviation for "greatest common divisor".

Input

Each line contains one positive integer n (0 < n < 2^31).

Output

For each number n print the number of required integers m.

Examples

Example 1

Loading
Loading