read p q ruby -e"p (1.0..).bsearch{|n|n>$p/n+$q*Math.log2(n)}"