let () =
  let n = Scanf.scanf "%d " (fun a -> a) in
  let a1 = Array.init n (fun _ -> Scanf.scanf "%d " (fun a -> a)) in
  let a2 = Array.init n (fun _ -> Scanf.scanf "%d " (fun a -> a)) in

  let ans = ref 0 in
  for i=0 to n-1 do
    let tmp = ref 0 in
    for j=0 to i do
      tmp := !tmp + a1.(j);
    done;
    for k=i to n-1 do
      tmp := !tmp + a2.(k);
    done;
    if !tmp > !ans then ans := !tmp else ();
  done;

  Printf.printf "%d\n" !ans
