import java.util.Scanner

object Main {
  def main(args: Array[String]) {
    if (args.length > 0 && args(0) == "TEST") {
      println(test())
    } else {
      val input = io.Source.stdin.getLines().mkString("\n")
      println(solve(input).trim())
    }
  }

  def solve(input: String): String = {
    val s: Scanner = new Scanner(input)
    val n = s.nextInt
    val a1 = List.fill(n)(s.nextInt)
    val a2 = List.fill(n)(s.nextInt)
    (1 to n).toList.map(i => a1.take(i).sum + a2.drop(i - 1).sum).max.toString
  }

  val tests = List(
    """5
      |3 2 2 4 1
      |1 2 2 2 1""".stripMargin -> """14""",
    """4
      |1 1 1 1
      |1 1 1 1""".stripMargin -> """5""",
    """7
      |3 3 4 5 4 5 3
      |5 3 4 4 2 3 2""".stripMargin -> """29""",
    """1
      |2
      |3""".stripMargin-> """5"""
  )

  def test(): String = tests.map { case (i, o) => (i.trim(), o.trim()) }
    .zipWithIndex.map {
    case ((input, outputExpect), i) =>
      val output = solve(input).trim()
      val tnum = i + 1
      s"test$tnum:" + (
        if (output == outputExpect) "Passed"
        else s"Failed\nexpect:\n$outputExpect\noutput:\n$output")
  }
    .mkString("\n")
}