import io.StdIn.{readInt, readLine}
object Main extends App {
  val n = readInt
  val as1 = readLine.split(" ").map(_.toInt)
  val as2 = readLine.split(" ").map(_.toInt)

  val counts = (1 to n).map(i => as1.take(i).sum + as2.drop(i-1).sum)
  val result = counts.max
  println(result)
}