#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define PB push_back #define MP(A, B) make_pair(A, B) #define fi first #define se second #define gcd(a,b) __gcd(a,b) #define pi acos(-1.0) #define pii pair #define ll long long #define MAX 1000005 #define MOD 1000000007 #define INF 0x3f3f3f3f #define EXP 1e-8 #define lowbit(x) (x&-x) ll qpow(ll p,ll q){ll f=1;while(q){if(q&1)f=f*p;p=p*p;q>>=1;}return f;} struct hash_pair { template size_t operator()(const pair& p) const { auto hash1 = hash{}(p.first); auto hash2 = hash{}(p.second); return hash1 ^ hash2; } }; int main() { int P, Q; cin >> P >> Q; double t1, t2; double h = 1, l = 1, m; t1 = h * h; t2 = P + Q * h * log(h)/log(2); while (t1 <= t2) { h *= 2; t1 = h * h; t2 = P + Q * h * log(h)/log(2); } // cout << l << ' ' << h << endl; while (fabs(h-l) > 1e-8) { m = l + (h-l)/2; t1 = m * m; t2 = P + Q * m * log(m)/log(2); // cout << l << ' ' << h << ' ' << t1 << ' ' << t2 << endl; if (t2 >= t1 && fabs(t2-t1) < EXP) break; if (t1 <= t2) l = m; else h = m; } m = l + (h-l)/2; printf("%.8lf\n", m); return 0; }