import java.math.*

fun main(args: Array<String>) {
    val N = readInputLine().toInt()
    
    val A = Array(2, {readInputLine().split(" ").map{it.toInt()}.toIntArray()})
    
    val dp = Array(2, {IntArray(N, {-1})})
    
    dp[0][0] = A[0][0]
    for (i in 1 until N) {
        dp[0][i] = dp[0][i - 1] + A[0][i]
    }
    dp[1][0] = dp[0][0] + A[1][0]
    for (i in 1 until N) {
        dp[1][i] = Math.max(dp[1][i - 1], dp[0][i]) + A[1][i]
    }
    
    println(dp[1][N - 1])
}

fun readInputLine(): String {
    return readLine()!!
}
