{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
import qualified Data.ByteString.Char8 as BS
import           Data.Vector.Unboxed   (Vector)
import qualified Data.Vector.Unboxed   as V

main :: IO ()
main = do
  n <- readLn
  as1 <- getInts
  as2 <- getInts
  print $ solve n as1 as2

solve :: Int -> Vector Int -> Vector Int -> Int
solve _ as1 as2 = V.maximum $ V.zipWith (+) ls rs  where
  ls = V.scanl1' (+) as1
  rs = V.scanr1' (+) as2

getInts :: IO (Vector Int)
getInts = V.unfoldr (BS.readInt . BS.dropWhile (== ' ')) <$> BS.getLine
