import Control.Monad
import Data.List
import Data.Function
main = do
  n <- readLn
  ms <- replicateM n $ do
    [a, b] <- map (read::String -> Int) . words <$> getLine
    return (a, b)
  print $ solve ms

solve :: [(Int, Int)] -> Int
solve = uncurry (+) . maximumBy (compare `on` fst)