module app;

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

void main(string[] args) {
    // 一行目の入力を捨てる
    readln();
    int[][] lines = iota(0,2).map!((Unused) => readln.chop.split.map!(to!int).array).array;
    auto candies = iota(0,lines[0].length).map!((x) => sum(lines[0][0..x+1]) + sum(lines[1][x..$]));
    int max_score = 0;
    candies.each!((num){
        if(num > max_score){
            max_score = num;
        }
    });
    writeln(max_score);
}