import java.util.*; public class Main { static HashSet all = new HashSet<>(); public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); int[] ika = new int[]{3, 3, 4, 4, 5, 5}; int[] base = new int[11]; int[] next = new int[11]; for (int i = 0; i < 6; i++) { for (int j = 0; j < 6; j++) { base[j - i + 5]++; } for (int x : ika) { next[x - i + 5]++; } } double[][] probables = new double[n + 1][101]; probables[0][50] = 1; for (int i = 1; i <= n; i++) { int[] tmp; if (i <= k) { tmp = next; } else { tmp = base; } for (int a = 0; a < probables[i].length; a++) { if (probables[i - 1][a] == 0.0) { continue; } for (int b = 0; b < tmp.length; b++) { int idx = a + b - 5; if (idx < 0 || idx >= probables[i].length || tmp[b] == 0) { continue; } probables[i][idx] += probables[i - 1][a] * tmp[b] / 36; } } } double ans = 0; for (int i = 51; i < probables[n].length; i++) { ans += probables[n][i]; } System.out.println(ans); } }