import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines import numpy as np N,K = map(int,read().split()) def update(dp,dice): newdp = np.zeros(61,np.int64) for x in dice: newdp[x:] += dp[:-x] return newdp D1 = [1,2,3,4,5,6] D2 = [4,5,6,4,5,6] A = np.zeros(61,np.int64) A[0] = 1 for _ in range(N): A = update(A, D1) B = np.zeros(61,np.int64) B[0] = 1 for _ in range(K): B = update(B, D2) for _ in range(N-K): B = update(B, D1) den = A.sum() * B.sum() num = 0 for a in range(61): num += A[a] * B[a+1:].sum() print(num / den)