Euler Totient Function


Submit solution

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

Author:
Problem types

Compute \(\varphi(n)\), the number of integers in \([1,n]\) that are coprime with \(n\).

Input

One positive integer \(n\).

The input satisfies:

  • \(1 <= n <= 10^12\)

Output

Print \(\varphi(n)\).

Example

Input
55
Output
40

Comments

There are no comments at the moment.