fn main() { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let v: Vec = s.split_whitespace().flat_map(str::parse).collect(); let (a, b) = (v[0].max(v[1]) * 2, v[0] == v[1]); println!("{}", a - if b { 0 } else { 1 }) }