// Try AtCoder
// author: Leonardone @ NEETSDKASU

[<EntryPoint>]
let main _ =
   let n = int <| stdin.ReadLine()
   seq { 1 .. n }
   |> Seq.map (fun _ -> stdin.ReadLine().Split(' ')
                                  |> Array.map int)
   |> Seq.sortBy (fun p -> Array.get p 1)
   |> Seq.head
   |> function [|x; y|] -> x + y
   |> printfn "%A"
   0