#include <iostream>
#include <cmath>
using namespace std;
int main() {
double E, logarithm=0, ai, x;
int i=2;
cin >> x >> E;
if(x!=0){
ai=(-x*x);
logarithm=ai;
while(abs(ai/2)>E){
ai*=x*x;
logarithm+=ai/i;
i++;
}
}
cout << logarithm;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKCWRvdWJsZSBFLCBsb2dhcml0aG09MCwgYWksIHg7CglpbnQgaT0yOwoJY2luID4+IHggPj4gRTsKCWlmKHghPTApewoJCWFpPSgteCp4KTsKCQlsb2dhcml0aG09YWk7CgkJd2hpbGUoYWJzKGFpLzIpPkUpewoJCQlhaSo9eCp4OwoJCQlsb2dhcml0aG0rPWFpL2k7CgkJCWkrKzsKCQl9Cgl9Cgljb3V0IDw8ICBsb2dhcml0aG07CgkKCXJldHVybiAwOwp9