Euler's Totient Function


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 256M

Author:
Problem types

Compute \(phi(n)\), the number of integers from \(1\) through \(n\) that are coprime with \(n\).

Input

One line containing \(n\).

The input satisfies:

  • \(1 \le n \le 10^12\)

Output

Print \(phi(n)\).

Example

Input
15845
Output
12672

Comments

There are no comments at the moment.