from scipy.optimize import * from math import * P,Q=map(int,input().split()) print(newton(lambda x:x*x-Q*x*log2(x)-P,1e20,maxiter=999))