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
Output appears hereOne integer n (1 ≤ n ≤ 10¹²).
One integer.
1
1
9
6
Output appears here