#include <iostream>
#include <cmath>
using namespace std;
double sin (double x, double e) {
     double k, a = x;
     double s = x;
     int n=1;
     while (abs(a) > e) {
	   k = - x * x / (2 * n * (2 * n + 1));
	   a *= k;
	   s += a;
	   n++;
     }
     return s;
}
int main () {
      double x, e;
      cin >> x >> e;
      cout << endl << sin(x, e);
}