import Data.Array.IO

main = do
    n <- readLn
    a <- map read . words <$> getLine :: IO [Int]
    b <- map read . words <$> getLine :: IO [Int]
    let ans = solve n [a,b] 1 (n - 1)
    print ans

solve :: Int -> [[Int]] -> Int -> Int -> Int
solve n a i j = 
    if i < 0 || j < 0
        then 0
        else (a !! i !! j) + max (solve n a  (i - 1) j) (solve n a  i (j - 1))

