use std::io::*; fn main() { let mut s: String = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let mut itr = s.trim().split_whitespace(); let n: usize = itr.next().unwrap().parse().unwrap(); let mut suma: i64 = 0; let mut sumb: i64 = 0; for _ in 0..n-1 { suma += itr.next().unwrap().parse::().unwrap(); sumb += itr.next().unwrap().parse::().unwrap(); } if suma > sumb { suma ^= sumb; sumb ^= suma; suma ^= sumb; } println!("{}", suma + 1); }