import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = sc.nextInt()
    val list1 = sc.asSequence().take(n).map(String::toInt).toList()
    val list2 = sc.asSequence().take(n).map(String::toInt).toList()
    println((0 until n).map {
        list1.slice(0..it).sum() + list2.slice(it until n).sum()
    }.max())
}