local n = io.read("*n")
local a, b = {}, {}
a[1], b[1] = 0, 0
for i = 2, n+1 do a[i] = a[i-1] + io.read("*n") end
for i = 2, n+1 do b[i] = b[i-1] + io.read("*n") end
local max = 0
local bm = b[n+1]
for i = 2, n+1 do
  max = math.max(max, a[i]+bm-b[i-1])
end
print(max)
