import Control.Monad
import Control.Applicative
import Data.List
import qualified Data.Map as Map
import Data.Array
strToInt s = (read :: String -> Int) s

main = do

    n <- readLn :: IO Int
    an <- map strToInt . words <$> getLine
    bn <- map strToInt . words <$> getLine

    let sa = array (1,n+1) ( (1,(an!!0)) : [(k , (an!!(k-1)) + (sa!(k-1))) | k <- [2,3..n]] )
    let sb = array (1,n+1) ( (1,(bn!!0)) : [(k , (bn!!(k-1)) + (sb!(k-1))) | k <- [2,3..n]] )

    let costmap = [sa!i + (costb sb n i) | i <- [1..n]]
    print $ maximum costmap

costb sb n 1 = sb!n
costb sb n i = sb!n - sb!(i-1)