from math import log2 def is_ok(N): return N <= Q * log2(N) + P / N P, Q = map(int, input().split()) ok = 1 ng = 10 ** 18 while ng - ok > 1: m = (ok + ng) // 2 if is_ok(m): ok = m else: ng = m t = ok e = 1 / 2 ** 18 while is_ok(t): t += e print(t - e)