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