use std::io::stdin;
 
fn main() {
    let nx = read_vec::<u64>();
    println!("{}", 6 * nx[1]);
}

fn read_vec<T>() -> Vec<T> where T: std::str::FromStr,
          <T as std::str::FromStr>::Err: std::fmt::Debug
{
    let mut s = String::new();
    stdin().read_line(&mut s).unwrap();
    
    s.trim().split(" ").map(|s| s.parse().unwrap()).collect::<Vec<T>>()
}