#import collections

#aa = collections.Counter(a) # list to list

#mod = 10**9 + 7

def readInts():

  return list(map(int,input().split()))

def main():

    n = int(eval(input()))

    A = [readInts() for _ in range(2)]



    #print(*A)

    # 下に行くidxを決めておく

    idx = 0

    # ゆーてnまでしかいけないけど

    ma_ = -1

    while idx < n:

        j = 0

        cnt = 0 # なんぼあるいたか

        dist = 0 #距離

        k = 0

        while k <= idx:

            if cnt <= n:

                dist += A[j][k]

                cnt += 1

            else:

                break

            k += 1

        k -=1

        # ここで下にずらす

        if cnt <= n:

            j += 1

            #print(idx,j,k)

            dist += A[j][k]

            cnt += 1

        k += 1 # 次始まるときはk += 1からだから

        # 右側を探索

        if cnt <= n:

            while k < n:

                if cnt <= n:

                    #print(k)

                    dist += A[j][k]

                    cnt += 1

                else:

                    break

                k += 1

        idx += 1

        #print(dist)

        ma_ = max(ma_,dist)

    print(ma_)





if __name__ == '__main__':

  main()

from statistics import median

#import collections

#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]

from fractions import gcd

from itertools import combinations # (string,3) 3回

from collections import deque

from collections import defaultdict

import bisect

#

#    d = m - k[i] - k[j]

#    if kk[bisect.bisect_right(kk,d) - 1] == d:

#

#

#

# pythonで無理なときは、pypyでやると正解するかも！！

#

#



import sys

sys.setrecursionlimit(10000000)

mod = 10**9 + 7



def readInts():

  return list(map(int,input().split()))



def main():

    n = int(eval(input()))

    A = readInts()

    B = readInts()

    ma = -1

    for i in range(n): # 何番目でswitch

        ma = max(ma,sum(A[:i+1]) + sum(B[i:]))

    print(ma)

if __name__ == '__main__':

  main()

# import collections
# aa = collections.Counter(a) # list to list
# mod = 10**9 + 7
def readInts():
    return list(map(int, input().split()))


def main():
    n = int(eval(input()))
    A = [readInts() for _ in range(2)]
    # print(*A)
    # 下に行くidxを決めておく
    idx = 0
    # ゆーてnまでしかいけないけど
    ma_ = -1
    while idx < n:
        j = 0
        cnt = 0  # なんぼあるいたか
        dist = 0  # 距離
        k = 0
        while k <= idx:
            if cnt <= n:
                dist += A[j][k]
                cnt += 1
            else:
                break
            k += 1
        k -= 1
        # ここで下にずらす
        if cnt <= n:
            j += 1
            # print(idx,j,k)
            dist += A[j][k]
            cnt += 1
        k += 1  # 次始まるときはk += 1からだから
        # 右側を探索
        if cnt <= n:
            while k < n:
                if cnt <= n:
                    # print(k)
                    dist += A[j][k]
                    cnt += 1
                else:
                    break
                k += 1
        idx += 1
        # print(dist)
        ma_ = max(ma_, dist)
    print(ma_)


if __name__ == "__main__":
    main()

from statistics import median

# import collections
# aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations  # (string,3) 3回
from collections import deque
from collections import defaultdict
import bisect

#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
import sys

sys.setrecursionlimit(10000000)
mod = 10**9 + 7


def readInts():
    return list(map(int, input().split()))


def main():
    n = int(eval(input()))
    A = readInts()
    B = readInts()
    ma = -1
    for i in range(n):  # 何番目でswitch
        ma = max(ma, sum(A[: i + 1]) + sum(B[i:]))
    print(ma)


if __name__ == "__main__":
    main()

+from statistics import median + -# aa = collections.Counter(a) # list to list -# mod = 10**9 + 7 +# aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0] +from fractions import gcd +from itertools import combinations  # (string,3) 3回 +from collections import deque +from collections import defaultdict +import bisect + +# +#    d = m - k[i] - k[j] +#    if kk[bisect.bisect_right(kk,d) - 1] == d: +# +# +# +# pythonで無理なときは、pypyでやると正解するかも！！ +# +# +import sys + +sys.setrecursionlimit(10000000) +mod = 10**9 + 7 + + -    A = [readInts() for _ in range(2)] -    # print(*A) -    # 下に行くidxを決めておく -    idx = 0 -    # ゆーてnまでしかいけないけど -    ma_ = -1 -    while idx < n: -        j = 0 -        cnt = 0  # なんぼあるいたか -        dist = 0  # 距離 -        k = 0 -        while k <= idx: -            if cnt <= n: -                dist += A[j][k] -                cnt += 1 -            else: -                break -            k += 1 -        k -= 1 -        # ここで下にずらす -        if cnt <= n: -            j += 1 -            # print(idx,j,k) -            dist += A[j][k] -            cnt += 1 -        k += 1  # 次始まるときはk += 1からだから -        # 右側を探索 -        if cnt <= n: -            while k < n: -                if cnt <= n: -                    # print(k) -                    dist += A[j][k] -                    cnt += 1 -                else: -                    break -                k += 1 -        idx += 1 -        # print(dist) -        ma_ = max(ma_, dist) -    print(ma_) +    A = readInts() +    B = readInts() +    ma = -1 +    for i in range(n):  # 何番目でswitch +        ma = max(ma, sum(A[: i + 1]) + sum(B[i:])) +    print(ma)