N = int(eval(input()))

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

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



Ans = 0

for x in range(N):

    ans = 0

    for i in range(N):

        if i <= x:

            ans += A1[i]

        if i >= x:

            ans += A2[i]

    Ans = max(Ans,ans)



print(Ans)
# atcoder : python3 (3.4.3)

import sys

input = sys.stdin.readline

sys.setrecursionlimit(10**6)

mod = 10**9+7



# main

N = int(eval(input()))

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

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



ans = 0

for i in range(N):

    ans = max(ans, sum(A1[0:i+1])+sum(A2[i:]))



print(ans)
N = int(eval(input()))
A1 = list(map(int, input().split()))
A2 = list(map(int, input().split()))
Ans = 0
for x in range(N):
    ans = 0
    for i in range(N):
        if i <= x:
            ans += A1[i]
        if i >= x:
            ans += A2[i]
    Ans = max(Ans, ans)
print(Ans)

# atcoder : python3 (3.4.3)
import sys

input = sys.stdin.readline
sys.setrecursionlimit(10**6)
mod = 10**9 + 7
# main
N = int(eval(input()))
A1 = list(map(int, input().split()))
A2 = list(map(int, input().split()))
ans = 0
for i in range(N):
    ans = max(ans, sum(A1[0 : i + 1]) + sum(A2[i:]))
print(ans)

+# atcoder : python3 (3.4.3) +import sys + +input = sys.stdin.readline +sys.setrecursionlimit(10**6) +mod = 10**9 + 7 +# main -Ans = 0 -for x in range(N): -    ans = 0 -    for i in range(N): -        if i <= x: -            ans += A1[i] -        if i >= x: -            ans += A2[i] -    Ans = max(Ans, ans) -print(Ans) +ans = 0 +for i in range(N): +    ans = max(ans, sum(A1[0 : i + 1]) + sum(A2[i:])) +print(ans)