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