let N = Int(readLine()!)!
let A1 = readLine()!.characters.split(" ").map{Int(String($0))!}
let A2 = readLine()!.characters.split(" ").map{Int(String($0))!}
var sumA1 = A1[0]
var sumA2 = A2.reduce(0){$0+$1}
var ans = sumA1 + sumA2
for i in 1..<N {
    sumA1 += A1[i]
    sumA2 -= A2[i-1]
    ans = max(sumA1 + sumA2, ans)
}
print(ans)