import numpy as np

import sys

sys.setrecursionlimit(10 ** 5 + 10)

# input = sys.stdin.readline



def resolve():



    N=int(eval(input()))

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

    B=list(map(int,input().split()))[::-1]



    from itertools import accumulate





    AA = list(accumulate([0] + A))+[0]  # 累積和を格納したリスト作成

    BB = (list(accumulate([0] + B))+[0])[::-1]  # 累積和を格納したリスト作成



    sumlist=np.array(AA)+np.array(BB)

    print((max(sumlist)))





resolve()
# from functools import reduce

from itertools import accumulate, permutations, combinations, combinations_with_replacement, groupby, product

# import math

# import numpy as np

import sys

sys.setrecursionlimit(10 ** 5 + 10)

# input = sys.stdin.readline



def resolve():

    N=int(eval(input()))

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

    B=list(map(int,input().split()))[::-1]



    from itertools import accumulate





    AA = [0] + A

    AA = list(accumulate(AA))+[0]



    BB=[0]+B

    BB=list(accumulate(BB))+[0]# 累積和を格納したリスト作成

    ans=0

    # この問題は長さが1-Nの連続部分の和の最大値を出せというものなので以下の通り

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

        ans = max(AA[i]+BB[N-i+1],ans)

    print(ans)







resolve()
import numpy as np
import sys

sys.setrecursionlimit(10**5 + 10)
# input = sys.stdin.readline
def resolve():
    N = int(eval(input()))
    A = list(map(int, input().split()))
    B = list(map(int, input().split()))[::-1]
    from itertools import accumulate

    AA = list(accumulate([0] + A)) + [0]  # 累積和を格納したリスト作成
    BB = (list(accumulate([0] + B)) + [0])[::-1]  # 累積和を格納したリスト作成
    sumlist = np.array(AA) + np.array(BB)
    print((max(sumlist)))


resolve()

# from functools import reduce
from itertools import (
    accumulate,
    permutations,
    combinations,
    combinations_with_replacement,
    groupby,
    product,
)

# import math
# import numpy as np
import sys

sys.setrecursionlimit(10**5 + 10)
# input = sys.stdin.readline
def resolve():
    N = int(eval(input()))
    A = list(map(int, input().split()))
    B = list(map(int, input().split()))[::-1]
    from itertools import accumulate

    AA = [0] + A
    AA = list(accumulate(AA)) + [0]
    BB = [0] + B
    BB = list(accumulate(BB)) + [0]  # 累積和を格納したリスト作成
    ans = 0
    # この問題は長さが1-Nの連続部分の和の最大値を出せというものなので以下の通り
    for i in range(1, N + 1):
        ans = max(AA[i] + BB[N - i + 1], ans)
    print(ans)


resolve()

-import numpy as np +# from functools import reduce +from itertools import ( +    accumulate, +    permutations, +    combinations, +    combinations_with_replacement, +    groupby, +    product, +) + +# import math +# import numpy as np -    AA = list(accumulate([0] + A)) + [0]  # 累積和を格納したリスト作成 -    BB = (list(accumulate([0] + B)) + [0])[::-1]  # 累積和を格納したリスト作成 -    sumlist = np.array(AA) + np.array(BB) -    print((max(sumlist))) +    AA = [0] + A +    AA = list(accumulate(AA)) + [0] +    BB = [0] + B +    BB = list(accumulate(BB)) + [0]  # 累積和を格納したリスト作成 +    ans = 0 +    # この問題は長さが1-Nの連続部分の和の最大値を出せというものなので以下の通り +    for i in range(1, N + 1): +        ans = max(AA[i] + BB[N - i + 1], ans) +    print(ans)