fn main() { let mut ab = String::new(); std::io::stdin().read_line(&mut ab).ok(); let mut ab = ab.trim().split_whitespace(); let a: i32 = ab.next().unwrap().parse().unwrap(); let b: i32 = ab.next().unwrap().parse().unwrap(); let ans = match (a, b) { (_, 0) => 1, (-1, _) => 2, (_, _) => -1, }; println!("{}", ans); }