import java.lang.Math.max

fun main(args: Array<String>) {
    val (n) = readLine()!!.split(' ').map(String::toInt)
    val a1 = readLine()!!.split(' ').map(String::toInt)
    val a2 = readLine()!!.split(' ').map(String::toInt)
    var sum = a1[0] + a2.sum()
    var current = sum
    for(i in 1 until n){
        current += a1[i] - a2[i-1]
        sum = max(sum, current)
    }
    print(sum)
}