#include #include #include using ldouble = long double; void solve() { ldouble p, q; std::cin >> p >> q; ldouble ok = 1, ng = 1e20; for (int i = 0; i < 200; ++i) { ldouble n = (ok + ng) / 2; if (n * n - n * q * std::log2(n) - p <= 0) { ok = n; } else { ng = n; } } std::cout << std::fixed << std::setprecision(10) << ok << std::endl; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }