#include <bits/stdc++.h>
using namespace std;
signed main(){
long double c, d;
cin >> c >> d;
long double l = 0, r = 1e12;
long double mid;
for(int i = 0; i < 100; i++){
mid = (l + r) * 0.5;
if(c + sqrt(mid) > d + mid * mid) l = mid;
else if(c + sqrt(mid) < d + (mid * mid)) r = mid;
}
cout << fixed << setprecision(15) << mid << endl;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CnNpZ25lZCBtYWluKCl7Cglsb25nIGRvdWJsZSBjLCBkOwoJY2luID4+IGMgPj4gZDsKCWxvbmcgZG91YmxlIGwgPSAwLCByID0gMWUxMjsKCWxvbmcgZG91YmxlIG1pZDsKCWZvcihpbnQgaSA9IDA7IGkgPCAxMDA7IGkrKyl7CgkJbWlkID0gKGwgKyByKSAqIDAuNTsKCQlpZihjICsgc3FydChtaWQpID4gZCArIG1pZCAqIG1pZCkgbCA9IG1pZDsKCQllbHNlIGlmKGMgKyBzcXJ0KG1pZCkgPCBkICsgKG1pZCAqIG1pZCkpIHIgPSBtaWQ7Cgl9Cgljb3V0IDw8IGZpeGVkIDw8IHNldHByZWNpc2lvbigxNSkgPDwgbWlkIDw8IGVuZGw7IAp9