import random n = int(input()) k = int(input()) num = 100000 random.seed() win = 0 for i in range(num): taro, jiro = 0, 0 for j in range(n): jiro += random.randint(1, 6) for l in range(k): taro += random.randint(4, 6) for m in range(n-k): taro += random.randint(1, 6) if taro > jiro: win += 1 print(win/num)