import java.util.Scanner; public class Yukicoder58 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int K = sc.nextInt(); int taro = 0, jiro = 0; int taroWin = 0; for (int i = 0; i < 2000000; i++) { taro = 0; jiro = 0; for (int j = 0; j < N; j++) { taro += j < K ? (int) (Math.random() * 3 + 4) : (int) (Math.random() * 6 + 1); jiro += (int) (Math.random() * 6 + 1); } if (taro > jiro) taroWin++; } System.out.println(taroWin / 2000000.0); } }