import random N = int(input()) K = int(input()) ans = 0 for _ in range(1000000): s0, s1 = 0, 0 for i in range(N): s0 += random.randint(1, 6) for i in range(N - K): s1 += random.randint(1, 6) for i in range(K): s1 += random.randint(4, 6) if s0 < s1: ans += 1 print(ans / 10 ** 6)