use std::cmp::min; fn main() { let mut ab = String::new(); std::io::stdin().read_line(&mut ab).ok(); let ab: Vec = ab.trim().split_whitespace().map(|s| s.parse().unwrap()).collect(); let a = ab[0]; let b = ab[1]; println!("{}", 2 * min(a, b) - if a == b { 1 } else { 0 }); }