local N = io.read("n")
local A1, A2 = {}, {}
for i=1,N do A1[i]=io.read("n") end
for i=1,N do A2[i]=io.read("n") end
local ans = 0
for sw=1,N do
  local c=0
  for i=1,sw do
    c=c+A1[i]
  end
  for i=sw,N do
    c=c+A2[i]
  end
  ans=math.max(ans,c)
end
print(ans)
