import Control.Monad
import Data.List
import qualified Data.ByteString.Char8 as B

main=do
    n<-readLn
    (a,b)<-maximum.map (\[a,b]->(a,b)) <$> replicateM n (map read.words<$>getLine)::IO(Int,Int)
    print $ a+b
