# -*- coding: utf-8 -*-



# AtCoder Beginner Contest

# Problem C



import numpy as np



if __name__ == '__main__':

    # Input

    N = int(eval(input()))

    route = np.zeros([2, N], dtype=int)



    # HACK: More smarter.

    for i in range(2):

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

        for j in range(N):

            route[i][j] = line[j]



    candy_count_max = 0



    # See: https://img.atcoder.jp/arc090/editorial.pdf

    # p.7

    # HACK: Not beautiful.

    for i in range(N):

        candy_count = 0



        for j in range(i + 1):

            candy_count += route[0][j]



        candy_count += route[1][i]



        for j in range(i + 1, N):

            candy_count += route[1][j]



        if candy_count > candy_count_max:

            candy_count_max = candy_count

    

    print(candy_count_max)
# -*- coding: utf-8 -*-





def main():

    n = int(eval(input()))

    a = [list(map(int, input().split())) for i in range(2)]

    count = 0



    for i in range(n):

        first = sum(a[0][:i + 1])

        second = sum(a[1][i:])

        count = max(count, first + second)



    print(count)





if __name__ == '__main__':

    main()

# -*- coding: utf-8 -*-
# AtCoder Beginner Contest
# Problem C
import numpy as np

if __name__ == "__main__":
    # Input
    N = int(eval(input()))
    route = np.zeros([2, N], dtype=int)
    # HACK: More smarter.
    for i in range(2):
        line = [int(i) for i in input().split(" ")]
        for j in range(N):
            route[i][j] = line[j]
    candy_count_max = 0
    # See: https://img.atcoder.jp/arc090/editorial.pdf
    # p.7
    # HACK: Not beautiful.
    for i in range(N):
        candy_count = 0
        for j in range(i + 1):
            candy_count += route[0][j]
        candy_count += route[1][i]
        for j in range(i + 1, N):
            candy_count += route[1][j]
        if candy_count > candy_count_max:
            candy_count_max = candy_count
    print(candy_count_max)

# -*- coding: utf-8 -*-
def main():
    n = int(eval(input()))
    a = [list(map(int, input().split())) for i in range(2)]
    count = 0
    for i in range(n):
        first = sum(a[0][: i + 1])
        second = sum(a[1][i:])
        count = max(count, first + second)
    print(count)


if __name__ == "__main__":
    main()

-# AtCoder Beginner Contest -# Problem C -import numpy as np +def main(): +    n = int(eval(input())) +    a = [list(map(int, input().split())) for i in range(2)] +    count = 0 +    for i in range(n): +        first = sum(a[0][: i + 1]) +        second = sum(a[1][i:]) +        count = max(count, first + second) +    print(count) + -    # Input -    N = int(eval(input())) -    route = np.zeros([2, N], dtype=int) -    # HACK: More smarter. -    for i in range(2): -        line = [int(i) for i in input().split(" ")] -        for j in range(N): -            route[i][j] = line[j] -    candy_count_max = 0 -    # See: https://img.atcoder.jp/arc090/editorial.pdf -    # p.7 -    # HACK: Not beautiful. -    for i in range(N): -        candy_count = 0 -        for j in range(i + 1): -            candy_count += route[0][j] -        candy_count += route[1][i] -        for j in range(i + 1, N): -            candy_count += route[1][j] -        if candy_count > candy_count_max: -            candy_count_max = candy_count -    print(candy_count_max) +    main()