import Debug.Trace

main = do
  _ <- read <$> getLine :: IO Int
  a1s <- map read . words <$> getLine :: IO [Int]
  a2s <- map read . words <$> getLine :: IO [Int]
  print $ solve a1s a2s

solve :: [Int] -> [Int] -> Int
solve a1s a2s =
--  traceShow cumsum1
--  traceShow cumsum2
--  traceShow candidate
  ans
  where
    cumsum1 =  scanl1 (+) a1s
    cumsum2 = scanr1 (+) a2s
    sumcandy [] [] acc = acc
    sumcandy (a1:a1s) (a2:a2s) acc =
      sumcandy a1s a2s (a1+a2:acc)
    candidate = sumcandy cumsum1 cumsum2 []
    ans = maximum candidate
