#include <bits/stdc++.h>
using namespace std;
int luythua(int a)
{
	int b=1;
	for (int i=1; i<=a; i++)
	b=b*a;
	return b;
}
int tinhsin(double a, double e)
{
	double x=a;
	int b=0,c=0;
	long long d=a;
	while (a<=e)
	{
		c++;
		a=pow(x,2*c+1)/luythua(2*c+1);
			if (c%2==0) d+=a; else d-=a;
	}
	return d;
}
int main ()
{
	freopen ("sinx.inp", "r", stdin);
	freopen ("sinx.out", "w", stdout);
	int x,e;
	cin>> x >>e;
	cout >> tinhsin (x,e);
		

}


