n=io.read("*n","*l")
a={}
for i=1,2 do
    for j=1,n do
        a[i][j]=io.read("*n")
    end
end

total=0
for i=1,n do
    count=0
    for j=1,i do
        count=count+a[1][j]
    end
    for k=i,n do
        count=count+a[2][k]
    end
    total=math.max(count,total)
end
print(total)