package main import ( "bufio" "fmt" "math/rand" "os" "strconv" "time" ) var sc = bufio.NewScanner(os.Stdin) func main() { sc.Split(bufio.ScanWords) n, k := nextInt(), nextInt() r := rand.New(rand.NewSource(time.Now().UnixNano())) yW, tW := 0, 0 for i := 0; i < 4000000; i++ { y, t := 0, 0 for j := 0; j < n; j++ { y += r.Intn(6) + 1 } for j := 0; j < n-k; j++ { t += r.Intn(6) + 1 } for j := 0; j < k; j++ { t += r.Intn(3) + 4 } if y > t { yW++ } else if t > y { tW++ } } fmt.Println(float64(tW) / 4000000) } func nextLine() string { sc.Scan() return sc.Text() } func nextInt() int { i, _ := strconv.Atoi(nextLine()) return i }