#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);
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmRvdWJsZSBzaW4gKGRvdWJsZSB4LCBkb3VibGUgZSkgewogICAgIGRvdWJsZSBrLCBhID0geDsKICAgICBkb3VibGUgcyA9IHg7CiAgICAgaW50IG49MTsKICAgICB3aGlsZSAoYWJzKGEpID4gZSkgewoJICAgayA9IC0geCAqIHggLyAoMiAqIG4gKiAoMiAqIG4gKyAxKSk7CgkgICBhICo9IGs7CgkgICBzICs9IGE7CgkgICBuKys7CiAgICAgfQogICAgIHJldHVybiBzOwp9CmludCBtYWluICgpIHsKICAgICAgZG91YmxlIHgsIGU7CiAgICAgIGNpbiA+PiB4ID4+IGU7CiAgICAgIGNvdXQgPDwgZW5kbCA8PCBzaW4oeCwgZSk7Cn0=