import java.util.Scanner

val sc = Scanner(System.`in`)

fun main(args : Array<String>) {
    val n = sc.nextInt()
    val a1 = listOfInt(n)
    val a2 = listOfInt(n)

    var max = 0
    for (i in 0 until n) {
        val sum = a1.take(i+1).sum() + a2.takeLast(n-i).sum()
        if (sum > max) max = sum
    }

    println(max)
}

fun listOfInt(n: Int) = (1..n).map { sc.nextInt() }.toList()