main(y){double x;for(;~scanf("%lf",&x);printf("%f\n",x))for(y=402408;y/=2;)x=y%2?sin(x):cos(x);}