def main(input):

    N = int(eval(input()))

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

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

    ans = [0] * N

    for i in range(N):

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

    print((max(ans)))



import sys; sys.setrecursionlimit(50000)

if __name__ == "__main__":

    if len(sys.argv) > 1 and sys.argv[1] == "local":

        with open("stdin.txt") as stdin:

            main(stdin.readline)

    else:

        main(sys.stdin.readline)

N = int(eval(input()))

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

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

ans = [sum(A1[:i+1]) + sum(A2[i:]) for i in range(N)]

print((max(ans)))

def main(input):
    N = int(eval(input()))
    A1 = list(map(int, input().split()))
    A2 = list(map(int, input().split()))
    ans = [0] * N
    for i in range(N):
        ans[i] = sum(A1[: i + 1]) + sum(A2[i:])
    print((max(ans)))


import sys

sys.setrecursionlimit(50000)
if __name__ == "__main__":
    if len(sys.argv) > 1 and sys.argv[1] == "local":
        with open("stdin.txt") as stdin:
            main(stdin.readline)
    else:
        main(sys.stdin.readline)

N = int(eval(input()))
A1 = list(map(int, input().split()))
A2 = list(map(int, input().split()))
ans = [sum(A1[: i + 1]) + sum(A2[i:]) for i in range(N)]
print((max(ans)))

-def main(input): -    N = int(eval(input())) -    A1 = list(map(int, input().split())) -    A2 = list(map(int, input().split())) -    ans = [0] * N -    for i in range(N): -        ans[i] = sum(A1[: i + 1]) + sum(A2[i:]) -    print((max(ans))) - - -import sys - -sys.setrecursionlimit(50000) -if __name__ == "__main__": -    if len(sys.argv) > 1 and sys.argv[1] == "local": -        with open("stdin.txt") as stdin: -            main(stdin.readline) -    else: -        main(sys.stdin.readline) +N = int(eval(input())) +A1 = list(map(int, input().split())) +A2 = list(map(int, input().split())) +ans = [sum(A1[: i + 1]) + sum(A2[i:]) for i in range(N)] +print((max(ans)))