#include <fstream>
#include <math.h>
#include <iomanip>

using namespace std;

long double Sin(long double &x, long double &e)
{
	long double total = 0;
	long double first = x;
	long double second = 1;
	for (long long i = 0;; i++)
	{
		if (i % 2 == 0)
		{
			total += first / second;
		}
		else
		{
			total -= first / second;
		}
		if (first / second <= e)
		{
			return total;
		}
		first *= x * x;
		second *= 2 * (i + 1) * (2 * (i + 1) + 1);
	}
}

int main()
{
	ifstream input("Sinx.inp");
	ofstream output("Sinx.out");
	long double x, e;
	input >> x >> e;
	output << fixed << setprecision(4) << Sin(x, e);
	input.close();
	output.close();
	return 0;
}