fun main(args: Array<String>) {
    abc087c()
}

fun abc087c() {
    val n = readLine()!!.toInt()
    val aList = (1..2).map { readLine()!!.split(" ").map { it.toInt() } }

    val dp = Array(2) { IntArray(n) }

    dp[0][0] = aList[0][0]
    dp[1][0] = aList[1][0] + aList[0][0]

    for (i in 1 until n) {
        dp[0][i] = dp[0][i - 1] + aList[0][i]
    }
    
    for (i in 1 until n) {
        dp[1][i] = Math.max(dp[0][i], dp[1][i - 1]) + aList[1][i]
    }

    println(dp.last().last())
}
