use std::io::*; fn rec(sai: &[usize], c: usize) -> f64 { if c == 0 { 1.0 } else { let mut res = 0.0; for &s in sai.iter() { res += s as f64 * rec(&sai, c - 1) / 6.0; } res } } fn main() { let mut s: String = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let mut itr = s.trim().split_whitespace(); let p: usize = itr.next().unwrap().parse().unwrap(); let c: usize = itr.next().unwrap().parse().unwrap(); let sai1: Vec = [2, 3, 5, 7, 11, 13].to_vec(); let sai2: Vec = [4, 6, 8, 9, 10, 12].to_vec(); println!("{:.10}", rec(&sai1, p) * rec(&sai2, c)); }