import Control.Applicative
import Control.Monad
import Data.List

main :: IO ()
main = do
    n <- readLn
    abs <- fmap (sortBy (\a b -> fst b `compare` fst a)) . replicateM n $ do
        [a, b] <- fmap read . words <$> getLine :: IO [Int]
        return (a, b)
    let (c, d) = head abs
    print $ c + d