#include
#include
main ()
{
double e,x;
double cosx(double x);
scanf("%lf%lf",&e,&x);
printf("%fn",cosx(x));
return 0;
}
double cosx(double x)
{
int i,flag;
double e,sum,item;
double function(int i);
flag=1;
i=0;
sum=0;
while(fabs(item)>e){
item=flag*pow(x,i)/function(i);
sum=sum+item;
flag=-flag;
i=i+2;
}
return sum;
}
double function(int i)
{
int a;
double fact;
fact=1.00;
for(a=2;a