fun main(args:Array<String>) {
    val n = readLine()!!.toInt()
    val candies = (1..2).map { readLine()!!.split(" ").map { it.toInt() }}
    val ans = (0 until n).map { candies[0].take(it+1).sum() + candies[1].drop(it).sum() }.max()
    println(ans!!)
}