use proconio::input; use proconio::fastout; use std::cmp::max; #[fastout] #[allow(non_snake_case)] fn main() { input! { x: isize, y: isize, x2: isize, y2: isize, } let mut ans = max(x, y); if x == y && x2 == y2 && 0 < x2 && x2 < x { ans += 1; } println!("{}", ans); }