import math R, K = map(int, input().split()) eps = 10 ** (-8) for i in range(K, 0, -1): m = [-R, R] while m[1] - m[0] > eps: t = sum(m) / 2 m[R ** 2 * math.acos(t / R) - t * (R ** 2 - t ** 2) ** 0.5 - R ** 2 * math.pi / (K + 1) * i < 0] = t print('{:.6f}'.format(t))