import sys

from collections import deque

input=sys.stdin.readline

sys.setrecursionlimit(10**6)



n=int(input().rstrip())

a=[list(map(int,input().split())) for _ in range(2)]

ans=0

print((max([sum(a[0][:i+1])+sum(a[1][i:]) for i in range(n)])))
import sys

input=sys.stdin.readline



n=int(input().rstrip())

a=[list(map(int,input().split())) for _ in range(2)]



ans=0

for i in range(n):

    now=sum(a[0][:i+1])+sum(a[1][i:])

    ans=max(ans,now)

print(ans)
import sys
from collections import deque

input = sys.stdin.readline
sys.setrecursionlimit(10**6)
n = int(input().rstrip())
a = [list(map(int, input().split())) for _ in range(2)]
ans = 0
print((max([sum(a[0][: i + 1]) + sum(a[1][i:]) for i in range(n)])))

import sys

input = sys.stdin.readline
n = int(input().rstrip())
a = [list(map(int, input().split())) for _ in range(2)]
ans = 0
for i in range(n):
    now = sum(a[0][: i + 1]) + sum(a[1][i:])
    ans = max(ans, now)
print(ans)

-from collections import deque -sys.setrecursionlimit(10**6) -print((max([sum(a[0][: i + 1]) + sum(a[1][i:]) for i in range(n)]))) +for i in range(n): +    now = sum(a[0][: i + 1]) + sum(a[1][i:]) +    ans = max(ans, now) +print(ans)