import math R, K = map(int, input().split()) PI = math.pi for i in range(K): S = PI * R * R * (i+1) / (K+1) ok = -R ng = R while ng - ok > 0.000001: h = (ok + ng) / 2 if h < 0: theta = 2 * math.acos(abs(h) / R) else: theta = 2 * (PI - math.acos(abs(h) / R)) T = R * R * theta / 2 if h < 0: T -= math.sqrt(R * R - h * h) * abs(h) else: T += math.sqrt(R * R - h * h) * abs(h) if S < T: ng = h else: ok = h print("{:.7f}".format(ok))