LearnPy Hub
← Arena
AdvancedRating 1600

Euler's Totient

Count the numbers from 1 to n that share no common factor with n (other than 1).

Input

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

Output

One integer.

Sample 1

Input
1
Output
1

Sample 2

Input
9
Output
6
solution.py
Output appears here
Euler's Totient · Python Arena problem · LearnPy Hub