(* O(n^2) *)
let f () = Scanf.scanf " %d" @@ (+) 0
let n = f ()
let a_ss = Array.init 2 @@ fun _ -> Array.init n @@ fun _ -> f ()
let ans = ref 0
let _ =
  for i = 0 to n - 1 do
    let s1 = Array.sub a_ss.(0) 0 @@ i + 1 |> Array.fold_left (+) 0 in
    let s2 = Array.sub a_ss.(1) i @@ n - i |> Array.fold_left (+) 0 in
    ans := max !ans @@ s1 + s2
  done;
  Printf.printf "%d\n" !ans