main =  do
  n <- readLn
  a1 <- (map read . words) <$> getLine
  a2 <- (map read . words) <$> getLine
  print $ maximum $ map (solve (a1, a2)) [1..n]


solve:: ([Int], [Int]) -> Int -> Int
solve x n = do
  let (x1, x2) = x
  let k = foldl (+) 0 (take n x1)
  let l = foldl (+) 0 (drop (n - 1) x2)
  k + l
