import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = sc.nextInt()
    val a = (1..2).map { (1..n).map { sc.nextInt() } }
    val dp = Array(2) {Array(n) {0} }

    dp[0][0] = a[0][0]
    for (i in 0 until 2) {
        for (j in 0 until n) {
            if (i == 0) {
                dp[i + 1][j] = Math.max(dp[i + 1][j], dp[i][j] + a[i + 1][j])
            }
            if (j < n - 1) {
                dp[i][j + 1] = Math.max(dp[i][j + 1], dp[i][j] + a[i][j + 1])
            }
        }
    }
    println(dp[1][n - 1])
}