Euler Totient Count

Count integers k from 1 to n that are coprime to n.

Medium4Number theoryNo attempts yetTime limit1sMemory limit256 MB

Problem

자연수 n이 주어졌을 때, GCD(n, k) = 1을 만족하는 자연수 1 ≤ k ≤ n 의 개수를 구하는 프로그램을 작성하시오.

Input

첫째 줄에 자연수 n (1 ≤ n ≤ 1012)이 주어진다.

Output

GCD(n, k) = 1을 만족하는 자연수 1 ≤ k ≤ n 의 개수를 출력한다.