object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt
  val first = List.fill(n)(sc.nextInt).toVector
  val second = List.fill(n)(sc.nextInt).toVector
  
  println((1 to n).toSeq.map(e => (first.take(e) ++ second.drop(e - 1)).sum).max)
}