#!/usr/bin/python
#coding:utf-8
from __future__ import division
import sys,random
if sys.version_info[0]>=3: raw_input=input
N = int(raw_input())
K = int(raw_input())
win = 0
NUM = 755000

for i in range(NUM):
    taro = 0
    jiro = 0
    for j in range(N):
        jiro += random.randrange(1, 7)
    for k in range(K):
        taro += random.randrange(4, 7)
    for l in range(N-K):
        taro += random.randrange(1, 7)
    if taro > jiro:
        win += 1
print(win/NUM)