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

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