open System
open System.Runtime.InteropServices

let read() = Console.ReadLine() |> int

let N = read()
let A = 
    let t = Array.zeroCreate 2
    for i in 0..1 do 
        t.[i] <- Console.ReadLine().Split()
                 |> Array.map(int)
    t

let dp = Array2D.zeroCreate 2 N
dp.[0,N-1] <- A.[0].[N-1] + A.[1].[N-1]
dp.[1,N-1] <- A.[1].[N-1]
for i in (N-2)..(-1)..0 do 
    dp.[1,i] <- A.[1].[i] + dp.[1,i+1]
    dp.[0,i] <- A.[0].[i] + max dp.[0,i+1] dp.[1,i]

dp.[0,0]
|> printfn "%i" 
