import scala.io.StdIn

object Main extends App {
  val n = StdIn.readLine.toInt
  val seq = Iterator.continually(StdIn.readLine)
    .take(2)
    .map(_.split(" ").map(_.toInt))
    .toArray
  val seq1 = seq(0).scanLeft(0)( (acc, e) => acc + e)
  val seq2 = seq(1).scanRight(0)( (e,acc) => acc + e)
  val ans = (0 until n).map(i => seq1(i+1) + seq2(i)).max

  println(ans)
}