import sys,time,random input=lambda:sys.stdin.readline().rstrip() N,K=[int(input()) for i in range(2)] T=time.time() trial,win=0,0 while time.time()-T<4.8: trial+=1 taro,jiro=0,0 for i in range(N): taro+=random.randrange(6)+1 for i in range(N-K): jiro+=random.randrange(6)+1 for i in range(K): jiro+=random.randrange(3)+4 win+=(jiro>taro) print(win/trial)