fn main() { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let n: Vec = s.split_whitespace().flat_map(str::parse).collect(); println!( "{}", match 2 * n[0] { x if x == n[1] || n[0] == n[1] => 4, x if x < n[1] || n[0] > n[1] => 0, _ => 8, } ) }