import java.util.Random; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int N = scanner.nextInt(); int K = scanner.nextInt(); Random r = new Random(); int win = 0; int lose = 0; long iteration = 5000000L; for (int i = 0; i < iteration; i++) { int jiro = 0; for (int j = 0; j < N; j++) { jiro += r.nextInt(6) + 1; } int taro = 0; for (int j = 0; j < N - K; j++) { taro += r.nextInt(6) + 1; } for (int j = 0; j < K; j++) { taro += r.nextInt(3) + 4; } if (jiro < taro) win++; } System.out.format("%f", ((float) win) / iteration); } }