let () = Scanf.scanf "%d\n" @@ fun n ->
  let abs = Array.init n @@ fun _ ->
    Scanf.scanf "%d %d\n" @@ fun a b -> a, b in
  Array.fold_left max (0, 0) abs
  |> (fun (a, b) -> a + b)
  |> Printf.printf "%d\n"
