N = int(input()) K = int(input()) dp = [[[0 for _ in range(6*N+1)] for _ in range(6*N+1)] for _ in range(N+1)] dp[0][0][0] = 1 for i in range(1,N+1): for j in range(6*N+1): for k in range(6*N+1): if i<=N-K: for j1 in range(1,min(6,j)+1): for k1 in range(1,min(6,k)+1): dp[i][j][k] += dp[i-1][j-j1][k-k1] else: for j1 in range(4,min(6,j)+1): for k1 in range(1,min(6,k)+1): dp[i][j][k] += 2*dp[i-1][j-j1][k-k1] ans = 0 for k in range(1,6*N): for j in range(k+1,6*N+1): ans += dp[N][j][k] print(ans/(pow(6,N)**2))