main :: IO()
main = do
  scoreA <- sum . map (read :: String -> Int) . words <$> getLine
  scoreB <- sum . map (read :: String -> Int) . words <$> getLine
  if scoreA > scoreB
    then print scoreA
  else print scoreB