from random import random def my_randint(x,y): width = y - x + 1 res = int(width * random()) + x - 1 return res N = int(input()) K = int(input()) trial = 100000 taro_win = 0 for _ in range(trial): taro_val = 0 jiro_val = 0 for i in range(N): if i < K: taro_val += my_randint(4,6) else: taro_val += my_randint(1,6) for i in range(N): jiro_val += my_randint(1,6) if taro_val > jiro_val: taro_win += 1 print(taro_win / trial)