fun main(args: Array<String>) {
  val N = readInt()
  val A = (1..2).map { readInts() }
  val dp = Array(2) { Array(N) { 0 } }
  dp[0][0] = A[0][0]
  dp[1][0] = A[0][0] + A[1][0]
  for (i in 1 until N) {
    dp[0][i] = dp[0][i - 1] + A[0][i]
  }
  for (i in 1 until N) {
    dp[1][i] = Math.max(dp[1][i - 1], dp[0][i]) + A[1][i]
  }

//  for (i in 0 until 2) {
//    for (j in 0 until N) {
//      print(dp[i][j])
//      print(" ")
//    }
//    println()
//  }
  println(dp[1][N - 1])
}

fun readString() = readLine()!!
fun readStrings() = readString().split(" ")
fun readInt() = readString().toInt()
fun readInts() = readStrings().map { it.toInt() }
fun readLongs() = readStrings().map { it.toLong() }
