fun main(args : Array<String>) {
    var n = readLine()!!.toInt()

    var upper = readLine()!!.split(" ").map { it.toInt() }.toMutableList()
    var lower = readLine()!!.split(" ").map { it.toInt() }.toMutableList()

    for (i in 1 until n - 1)
        upper[i] += upper[i - 1]
    for (i in n - 2 downTo 0)
        lower[i] += lower[i + 1]

    println("%d".format(upper.zip(lower).map { it.first + it.second }.max()))
}
