import random n = int(input()) k = int(input()) tes = 10**5 cnt = 0 for i in range(tes): taro = 0 jiro = 0 for j in range(n): if j < k: taro += random.randint(4, 6) else: taro += random.randint(1, 6) jiro += random.randint(1, 6) if taro > jiro: cnt += 1 res = cnt / tes print(res)