import java.util.*;
class Main
{
    public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        int[] b = new int[n];
        a[0] = sc.nextInt();
        for(int i = 1; i < n; i++) a[i] = a[i-1] + sc.nextInt();
        b[0] = sc.nextInt();
        for(int i = 1; i < n; i++) b[i] = b[i-1] + sc.nextInt();
        int ans = a[0] + b[n-1];
        for(int i = 1; i < n; i++)
            ans = Math.max(ans, a[i] + b[n-1] - b[i-1]);
        System.out.println(ans);
    }
} import java.util.*; util.* java class Main
{
    public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        int[] b = new int[n];
        a[0] = sc.nextInt();
        for(int i = 1; i < n; i++) a[i] = a[i-1] + sc.nextInt();
        b[0] = sc.nextInt();
        for(int i = 1; i < n; i++) b[i] = b[i-1] + sc.nextInt();
        int ans = a[0] + b[n-1];
        for(int i = 1; i < n; i++)
            ans = Math.max(ans, a[i] + b[n-1] - b[i-1]);
        System.out.println(ans);
    }
} Main public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        int[] b = new int[n];
        a[0] = sc.nextInt();
        for(int i = 1; i < n; i++) a[i] = a[i-1] + sc.nextInt();
        b[0] = sc.nextInt();
        for(int i = 1; i < n; i++) b[i] = b[i-1] + sc.nextInt();
        int ans = a[0] + b[n-1];
        for(int i = 1; i < n; i++)
            ans = Math.max(ans, a[i] + b[n-1] - b[i-1]);
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        int[] b = new int[n];
        a[0] = sc.nextInt();
        for(int i = 1; i < n; i++) a[i] = a[i-1] + sc.nextInt();
        b[0] = sc.nextInt();
        for(int i = 1; i < n; i++) b[i] = b[i-1] + sc.nextInt();
        int ans = a[0] + b[n-1];
        for(int i = 1; i < n; i++)
            ans = Math.max(ans, a[i] + b[n-1] - b[i-1]);
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] a = new int[n]; a new int[n] n int[] b = new int[n]; b new int[n] n a[0] = sc.nextInt() a[0] a 0 sc.nextInt() sc.nextInt sc for(int i = 1; i < n; i++) a[i] = a[i-1] + sc.nextInt(); int i = 1; int i = 1; i 1 i < n i n i++ i++ i a[i] = a[i-1] + sc.nextInt(); a[i] = a[i-1] + sc.nextInt() a[i] a i a[i-1] + sc.nextInt() a[i-1] a i-1 i 1 sc.nextInt() sc.nextInt sc b[0] = sc.nextInt() b[0] b 0 sc.nextInt() sc.nextInt sc for(int i = 1; i < n; i++) b[i] = b[i-1] + sc.nextInt(); int i = 1; int i = 1; i 1 i < n i n i++ i++ i b[i] = b[i-1] + sc.nextInt(); b[i] = b[i-1] + sc.nextInt() b[i] b i b[i-1] + sc.nextInt() b[i-1] b i-1 i 1 sc.nextInt() sc.nextInt sc int ans = a[0] + b[n-1]; ans a[0] + b[n-1] a[0] a 0 b[n-1] b n-1 n 1 for(int i = 1; i < n; i++)
            ans = Math.max(ans, a[i] + b[n-1] - b[i-1]); int i = 1; int i = 1; i 1 i < n i n i++ i++ i ans = Math.max(ans, a[i] + b[n-1] - b[i-1]); ans = Math.max(ans, a[i] + b[n-1] - b[i-1]) ans Math.max(ans, a[i] + b[n-1] - b[i-1]) Math.max Math ans a[i] + b[n-1] - b[i-1] a[i] + b[n-1] a[i] a i b[n-1] b n-1 n 1 b[i-1] b i-1 i 1 System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;
class Main
{
    public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        int[] b = new int[n];
        a[0] = sc.nextInt();
        for(int i = 1; i < n; i++) a[i] = a[i-1] + sc.nextInt();
        b[0] = sc.nextInt();
        for(int i = 1; i < n; i++) b[i] = b[i-1] + sc.nextInt();
        int ans = a[0] + b[n-1];
        for(int i = 1; i < n; i++)
            ans = Math.max(ans, a[i] + b[n-1] - b[i-1]);
        System.out.println(ans);
    }
}