fun readInts() = readLine()!!.split(' ').map(String::toInt)

fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val a = readInts()
    val b = readInts()

    val sa = IntArray(n)
    val sb = IntArray(n)
    sa[0] = a[0]
    sb[n - 1] = b[n - 1]
    for (i in 1 until n) {
        sa[i] = sa[i - 1] + a[i]
        sb[n - i - 1] = sb[n - i] + b[n - i - 1]
    }
    var ans = 0
    for (i in 0 until n) {
        ans = Math.max(ans, sa[i] + sb[i])
    }
    println(ans)
}
