#include using namespace std; #ifdef LOCAL #include "debug.h" #else #define DEBUG(...) #endif int main() { cin.tie(nullptr); ios::sync_with_stdio(false); double p, q; cin >> p >> q; double ok = 1, ng = 1e100; for (int _ = 1000; _--; ) { double mid = (ok + ng) / 2; (mid * mid < p + q * mid * log2(mid) ? ok : ng) = mid; } cout << fixed << setprecision(20) << ok << '\n'; }