LearnPy Hub
← Arena
IntermediateRating 1300

Coprime Numbers

Count the integers from 1 to n that are coprime to n (Euler's totient φ(n)).

Input

One integer n (1 ≤ n ≤ 10¹²).

Output

φ(n).

Sample 1

Input
9
Output
6

Sample 2

Input
1
Output
1
solution.py
Output appears here
Coprime Numbers · Python Arena problem · LearnPy Hub