def main():

    N = int(eval(input()))

    A = [[int(i) for i in input().split()] for j in range(2)]

    ans = 0

    for i in range(N):

        cur = 0

        for j in range(i, N):

            cur = sum(A[0][:i+1]) + sum(A[1][i:])

        ans = max(ans, cur)

    print(ans)





if __name__ == '__main__':

    main()

def main():

    N = int(eval(input()))

    A = [[int(i) for i in input().split()] for j in range(2)]

    ans = 0

    for i in range(N):

        cur = sum(A[0][:i+1]) + sum(A[1][i:])

        ans = max(ans, cur)

    print(ans)





if __name__ == '__main__':

    main()

def main():
    N = int(eval(input()))
    A = [[int(i) for i in input().split()] for j in range(2)]
    ans = 0
    for i in range(N):
        cur = 0
        for j in range(i, N):
            cur = sum(A[0][: i + 1]) + sum(A[1][i:])
        ans = max(ans, cur)
    print(ans)


if __name__ == "__main__":
    main()

def main():
    N = int(eval(input()))
    A = [[int(i) for i in input().split()] for j in range(2)]
    ans = 0
    for i in range(N):
        cur = sum(A[0][: i + 1]) + sum(A[1][i:])
        ans = max(ans, cur)
    print(ans)


if __name__ == "__main__":
    main()

-        cur = 0 -        for j in range(i, N): -            cur = sum(A[0][: i + 1]) + sum(A[1][i:]) +        cur = sum(A[0][: i + 1]) + sum(A[1][i:])