In number theory, Euler's totient function counts the positive integers up to a given integer N that are relatively prime to N. In other words, it is the number of integers K in the range 1 ≤ K ≤ N for which the greatest common divisor gcd(n, K) is equal to 1.

COMING SOON!

```
#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b)
{
return (b > 0 ? gcd(b, a%b) : a);
}
unsigned int phi(unsigned int n)
{
unsigned int result = 1;
for (int i = 2; i < n; ++i)
{
if (gcd(i, n) == 1)
{
result++;
}
}
return result;
}
int main()
{
int n;
cin >> n;
assert(n <= 1000000); // Assertion to ensure execution time is reasonable ( < 1second)
cout << "Value of Euler's totient function for n is " << phi(n) << endl;
return 0;
}
```