module app;

import std.stdio;
import std.string;
import std.conv;
import std.algorithm;
import std.range;

void main(string[] argv){
    // input
    int n;
    n = to!int(readln().chop());

    int[] a1;
    a1 = map!(to!int)(readln().chop().split()).array();

    int[] a2;
    a2 = map!(to!int)(readln().chop().split()).array();

    int answer;
    foreach(temp; map!((x) => get_candies_num(x,a1,a2))(iota(0,n))) {
        if(answer < temp){
            answer = temp;
        }
    }

    writeln(answer);
}

// x行目で曲がった時に回収できる飴の個数
int get_candies_num(int x, int[] a1, int[] a2){
    int result;
    result = a1[0..x+1].sum() + a2[x..$].sum();
    return result;
}