import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int K = scan.nextInt(); scan.close(); if(K == 0) { System.out.println(0.5); System.exit(0); } int a[] = new int[6 * N + 1]; int b[] = new int[6 * N + 1]; int [][]S = new int[N + 1][6 * N + 1]; Arrays.fill(a, 0); Arrays.fill(b, 0); for(int i = 1; i <= 6; i++) { a[i] = 1; S[1][i] = 1; } for(int i = 2; i <= N; i++) { for(int j = i; j <= 6 * i; j++) { for(int k = 1; k <= 6; k++) { if(j - k <= 0) { break; } S[i][j] += S[i - 1][j - k]; } } } int[][]S2 = new int[N + 1][6 * N + 1]; for(int i = 1; i <= 6; i++) { if(i <= 3) { S2[1][i] = 0; }else { S2[1][i] = 1; } } for(int i = 2; i <= K; i++) { for(int j = i; j <= 6 * i; j++) { for(int k = 4; k <= 6; k++) { if(j - k <= 0) { break; } S2[i][j] += S2[i - 1][j - k]; } } } if(N != K) { int n = N - K; for(int i = K + 1; i <= N; i++) { for(int j = i; j <= 6 * i; j++) { for(int k = 1; k <= 6; k++) { if(j - k <= 0) { break; } S2[i][j] += S2[i - 1][j - k]; } } } } long d1 = 0; long d2 = 0; for(int i = N; i <= 6 * N; i++) { d1 += S[N][i]; d2 += S2[N][i]; } double ans = 0; for(int i = N; i <= 6 * N; i++) { for(int j = 0; j < i; j++) { ans += (double) (S2[N][i] * S[N][j]) / (d1 * d2); } } System.out.println(ans); } }