import sys

import numpy as np 



I = np.array(sys.stdin.read().split(), dtype=np.int64)

n = I[0]

l1, l2 = I[1:].reshape(2, n)



def main():

    res = 0

    for i in range(n):

        res = max(res, np.sum(l1[:i+1]) + np.sum(l2[i:]))

    return res



if __name__ == '__main__':

    ans = main()

    print(ans)
import sys



n = int(sys.stdin.readline().rstrip())

a = [0] + [int(x) for x in sys.stdin.readline().split()]

b = [0] + [int(x) for x in sys.stdin.readline().split()]



def main():

    for i in range(n):

        a[i+1] += a[i]

        b[i+1] += b[i]

    res = 0

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

        res = max(res, a[i] + b[n] - b[i-1])

    print(res)



if __name__ ==  '__main__':

    main()
import sys
import numpy as np

I = np.array(sys.stdin.read().split(), dtype=np.int64)
n = I[0]
l1, l2 = I[1:].reshape(2, n)


def main():
    res = 0
    for i in range(n):
        res = max(res, np.sum(l1[: i + 1]) + np.sum(l2[i:]))
    return res


if __name__ == "__main__":
    ans = main()
    print(ans)

import sys

n = int(sys.stdin.readline().rstrip())
a = [0] + [int(x) for x in sys.stdin.readline().split()]
b = [0] + [int(x) for x in sys.stdin.readline().split()]


def main():
    for i in range(n):
        a[i + 1] += a[i]
        b[i + 1] += b[i]
    res = 0
    for i in range(1, n + 1):
        res = max(res, a[i] + b[n] - b[i - 1])
    print(res)


if __name__ == "__main__":
    main()

-import numpy as np -I = np.array(sys.stdin.read().split(), dtype=np.int64) -n = I[0] -l1, l2 = I[1:].reshape(2, n) +n = int(sys.stdin.readline().rstrip()) +a = [0] + [int(x) for x in sys.stdin.readline().split()] +b = [0] + [int(x) for x in sys.stdin.readline().split()] +    for i in range(n): +        a[i + 1] += a[i] +        b[i + 1] += b[i] -    for i in range(n): -        res = max(res, np.sum(l1[: i + 1]) + np.sum(l2[i:])) -    return res +    for i in range(1, n + 1): +        res = max(res, a[i] + b[n] - b[i - 1]) +    print(res) -    ans = main() -    print(ans) +    main()