import core.bitop;
import std.algorithm;
import std.ascii;
import std.bigint;
import std.conv;
import std.functional;
import std.math;
import std.numeric;
import std.range;
import std.stdio;
import std.string;
import std.random;

T lread(T = long)()
{
    return readln.chomp.to!T();
}

T[] aryread(T = long)()
{
    return readln.split.to!(T[])();
}

alias sread = () => readln.chomp();

void main()
{
    long N = lread();
    auto A1 = aryread();
    auto A2 = aryread();

    foreach (i; 1 .. N)
    {
        A1[i] = A1[i] + A1[i - 1];
        A2[i] = A2[i] + A2[i - 1];
    }

    long result = 0;

    // writeln(A1, A2);

    foreach (i; 0 .. N)
    {
        long tmp = A1[i] + A2[$ - 1] - ((i == 0) ? 0 : A2[i - 1]);
        result = result.max(tmp);
    }

    result.writeln();

}
