N = int(eval(input()))

A = list(map(int,input().split()))

B = list(map(int,input().split()))



ans = 0

for i in range(N):

    cur = 0

    for j in range(N):

        if j < i:

            cur += A[j]

        elif j == i:

            cur += A[j] + B[j]

        else:

            cur += B[j]

    ans = max(ans , cur)

print(ans)
import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline



N = int(readline())

A = list(map(int,readline().split()))

B = list(map(int,readline().split()))



def rui(a):

    ret = [0] * (len(a) + 1)

    for i in range(len(a)):

        ret[i + 1] = ret[i] + a[i]

    return ret



ra = rui(A)

rb = rui(B)



ans = 0

for i in range(N):

    ans = max(ans, ra[i + 1] + rb[N] - rb[i])

print(ans)

N = int(eval(input()))
A = list(map(int, input().split()))
B = list(map(int, input().split()))
ans = 0
for i in range(N):
    cur = 0
    for j in range(N):
        if j < i:
            cur += A[j]
        elif j == i:
            cur += A[j] + B[j]
        else:
            cur += B[j]
    ans = max(ans, cur)
print(ans)

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
N = int(readline())
A = list(map(int, readline().split()))
B = list(map(int, readline().split()))


def rui(a):
    ret = [0] * (len(a) + 1)
    for i in range(len(a)):
        ret[i + 1] = ret[i] + a[i]
    return ret


ra = rui(A)
rb = rui(B)
ans = 0
for i in range(N):
    ans = max(ans, ra[i + 1] + rb[N] - rb[i])
print(ans)

-N = int(eval(input())) -A = list(map(int, input().split())) -B = list(map(int, input().split())) +import sys + +read = sys.stdin.buffer.read +readline = sys.stdin.buffer.readline +N = int(readline()) +A = list(map(int, readline().split())) +B = list(map(int, readline().split())) + + +def rui(a): +    ret = [0] * (len(a) + 1) +    for i in range(len(a)): +        ret[i + 1] = ret[i] + a[i] +    return ret + + +ra = rui(A) +rb = rui(B) -    cur = 0 -    for j in range(N): -        if j < i: -            cur += A[j] -        elif j == i: -            cur += A[j] + B[j] -        else: -            cur += B[j] -    ans = max(ans, cur) +    ans = max(ans, ra[i + 1] + rb[N] - rb[i])