#include<fstream>
#include<iomanip>
using namespace std;
int cx(float x,float e)
{
	int n=1;
	float p=x;
	while(x>e)
	{
		if(x<=e) break;
		x=x*p*p/((n+1)*(n+2));
		n++;
	}
	return n;
}
int main()
{
	ifstream f1("Sin.inp");
	ofstream f2("Sin.out");
	float x,e;
	f1>>x>>e;
	int n=cx(x,e);
	int i;
	float sin=x;
	float p=x;
	for(i=1;i<=n;i++)
	{
		x=x*p*p/((i+1)*(i+2));
		if(i%2==0) sin+=x;
		else sin-=x;
	}
	f2.setf(ios::fixed);
	f2.setf(ios::showpoint);
	f2.precision(4);
	f2<<sin;
	f1.close();
	f2.close();
	return 0;
}
