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():

    from itertools import accumulate

    N = int(eval(input()))

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

    B = [int(i) for i in input().split()]

    accA = list(accumulate(A))

    accB = list(accumulate([0] + B))

    ans = 0

    for i in range(N):

        cur = accA[i] + (accB[N] - accB[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():
    from itertools import accumulate

    N = int(eval(input()))
    A = [int(i) for i in input().split()]
    B = [int(i) for i in input().split()]
    accA = list(accumulate(A))
    accB = list(accumulate([0] + B))
    ans = 0
    for i in range(N):
        cur = accA[i] + (accB[N] - accB[i])
        ans = max(ans, cur)
    print(ans)


if __name__ == "__main__":
    main()

+    from itertools import accumulate + -    A = [[int(i) for i in input().split()] for j in range(2)] +    A = [int(i) for i in input().split()] +    B = [int(i) for i in input().split()] +    accA = list(accumulate(A)) +    accB = list(accumulate([0] + B)) -        cur = sum(A[0][: i + 1]) + sum(A[1][i:]) +        cur = accA[i] + (accB[N] - accB[i])