def main():

    n = int(eval(input()))

    matrix = []

    matrix.append([int(num) for num in input().split()])

    matrix.append([int(num) for num in input().split()])

    # RE:  matrix = [int(num) for num in (input().split() for i in range(2))]



    candies = [sum(matrix[0][:d+1]) + sum(matrix[1][d:]) for d in range(n)]

    print((max(candies)))





if __name__ == '__main__':

    main()

def main():

    n = int(eval(input()))

    matrix = [[int(num) for num in input().split()] for _ in range(2)]



    candies = [sum(matrix[0][:d+1]) + sum(matrix[1][d:]) for d in range(n)]

    print((max(candies)))





if __name__ == '__main__':

    main()

def main():
    n = int(eval(input()))
    matrix = []
    matrix.append([int(num) for num in input().split()])
    matrix.append([int(num) for num in input().split()])
    # RE:  matrix = [int(num) for num in (input().split() for i in range(2))]
    candies = [sum(matrix[0][: d + 1]) + sum(matrix[1][d:]) for d in range(n)]
    print((max(candies)))


if __name__ == "__main__":
    main()

def main():
    n = int(eval(input()))
    matrix = [[int(num) for num in input().split()] for _ in range(2)]
    candies = [sum(matrix[0][: d + 1]) + sum(matrix[1][d:]) for d in range(n)]
    print((max(candies)))


if __name__ == "__main__":
    main()

-    matrix = [] -    matrix.append([int(num) for num in input().split()]) -    matrix.append([int(num) for num in input().split()]) -    # RE:  matrix = [int(num) for num in (input().split() for i in range(2))] +    matrix = [[int(num) for num in input().split()] for _ in range(2)]