let n = Scanf.scanf " %d" (+) 0
let a_ss = Array.init 2 @@ fun _ -> Array.init n @@ fun _ -> Scanf.scanf " %d" (+) 0
let ans = ref 0
let _ =
  for i = 0 to n - 1 do
    let sum = ref 0 in
    for j = 0 to i do sum := !sum + a_ss.(0).(j) done;
    for j = i to n - 1 do sum := !sum + a_ss.(1).(j) done;
    ans := max !ans !sum done;
  Printf.printf "%d\n" !ans