main = do
  n <- getLine
  as1 <- getLine >>= return . map read . words :: IO [Int]
  as2 <- getLine >>= return . map read . words :: IO [Int]

  let
    as1' = scanl1 (+) as1
    s = sum as2
    as2' = init $ map (\x -> s - x) (scanl (+) 0 as2)

  print $ maximum $ zipWith (+) as1' as2'
  
