How to Become Star?: http://acm.timus.ru/problem.aspx?space=1&num=1259
#include<stdio.h>
#include<stdlib.h>
using namespace std;
int gcd(int a,int b){
while (b!=0){
int v=b;
b=a%b;
a=v;
}
return a;
}
int main(){
int n;
scanf("%d",&n);
int st=1;
for (int i=2;i<=n/2;i++){
if (gcd(n,i)==1) st++;
}
printf("%d\n",st);
return 0;
}