from math import log2 def is_ok(N): return N <= Q * log2(N) + P 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 e = 1 / 2 ** 20 t = ok for i in range(2 ** 20): t += e if not is_ok(t): break print(t - e)