import java.math.BigDecimal; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int p = sc.nextInt(); int q = sc.nextInt(); sc.close(); double ok = 1; double ng = 1e18; while (Math.abs(ok - ng) > 1e-6) { double mid = (ok + ng) / 2; if (calc(mid, q) <= p) { ok = mid; } else { ng = mid; } } System.out.println(ok); } static double calc(double mid, int q) { BigDecimal bn = BigDecimal.valueOf(mid); BigDecimal bq = BigDecimal.valueOf(q); BigDecimal bln = BigDecimal.valueOf(Math.log10(mid) / Math.log10(2)); return bn.multiply(bn.subtract(bq.multiply(bln))).doubleValue(); } }