let get_input () =
    read_line () |> Str.split (Str.regexp " ") |> List.map int_of_string

let () =
    let _ = read_int () in
    let upper = get_input () in
    let lower = get_input () in
    List.fold_left2 (fun (usum, lsum) uelem lelem ->
        (usum + uelem, max (lsum + lelem) (usum + uelem + lelem))
    ) (0, 0) upper lower
    |> (fun (x, y) -> max x y)
    |> string_of_int
    |> print_endline
