import java.io.*;
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));

        int n = in.nextInt();

        int[][] array = new int[2][n];
        for (int i = 0; i < 2; i++)
            for (int j = 0; j < n; j++)
                array[i][j] = in.nextInt();

        for (int j = n - 2; j >= 0; j--)
            array[1][j] += array[1][j + 1];
        array[0][n - 1] += array[1][n - 1];
        for (int j = n - 2; j >= 0; j--)
            array[0][j] += Math.max(array[1][j], array[0][j + 1]);
        System.out.println(array[0][0]);
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));

        int n = in.nextInt();

        int[][] array = new int[2][n];
        for (int i = 0; i < 2; i++)
            for (int j = 0; j < n; j++)
                array[i][j] = in.nextInt();

        for (int j = n - 2; j >= 0; j--)
            array[1][j] += array[1][j + 1];
        array[0][n - 1] += array[1][n - 1];
        for (int j = n - 2; j >= 0; j--)
            array[0][j] += Math.max(array[1][j], array[0][j + 1]);
        System.out.println(array[0][0]);
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));

        int n = in.nextInt();

        int[][] array = new int[2][n];
        for (int i = 0; i < 2; i++)
            for (int j = 0; j < n; j++)
                array[i][j] = in.nextInt();

        for (int j = n - 2; j >= 0; j--)
            array[1][j] += array[1][j + 1];
        array[0][n - 1] += array[1][n - 1];
        for (int j = n - 2; j >= 0; j--)
            array[0][j] += Math.max(array[1][j], array[0][j + 1]);
        System.out.println(array[0][0]);
    } main {
        Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));

        int n = in.nextInt();

        int[][] array = new int[2][n];
        for (int i = 0; i < 2; i++)
            for (int j = 0; j < n; j++)
                array[i][j] = in.nextInt();

        for (int j = n - 2; j >= 0; j--)
            array[1][j] += array[1][j + 1];
        array[0][n - 1] += array[1][n - 1];
        for (int j = n - 2; j >= 0; j--)
            array[0][j] += Math.max(array[1][j], array[0][j + 1]);
        System.out.println(array[0][0]);
    } Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in))); in new Scanner(new BufferedReader(new InputStreamReader(System.in))) int n = in.nextInt(); n in.nextInt() in.nextInt in int[][] array = new int[2][n]; array new int[2][n] 2 n for (int i = 0; i < 2; i++)
            for (int j = 0; j < n; j++)
                array[i][j] = in.nextInt(); int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i for (int j = 0; j < n; j++)
                array[i][j] = in.nextInt(); for (int j = 0; j < n; j++)
                array[i][j] = in.nextInt(); int j = 0; int j = 0; j 0 j < n j n j++ j++ j array[i][j] = in.nextInt(); array[i][j] = in.nextInt() array[i][j] array[i] array i j in.nextInt() in.nextInt in for (int j = n - 2; j >= 0; j--)
            array[1][j] += array[1][j + 1]; int j = n - 2; int j = n - 2; j n - 2 n 2 j >= 0 j 0 j-- j-- j array[1][j] += array[1][j + 1]; array[1][j] += array[1][j + 1] array[1][j] array[1] array 1 j array[1][j + 1] array[1] array 1 j + 1 j 1 array[0][n - 1] += array[1][n - 1] array[0][n - 1] array[0] array 0 n - 1 n 1 array[1][n - 1] array[1] array 1 n - 1 n 1 for (int j = n - 2; j >= 0; j--)
            array[0][j] += Math.max(array[1][j], array[0][j + 1]); int j = n - 2; int j = n - 2; j n - 2 n 2 j >= 0 j 0 j-- j-- j array[0][j] += Math.max(array[1][j], array[0][j + 1]); array[0][j] += Math.max(array[1][j], array[0][j + 1]) array[0][j] array[0] array 0 j Math.max(array[1][j], array[0][j + 1]) Math.max Math array[1][j] array[1] array 1 j array[0][j + 1] array[0] array 0 j + 1 j 1 System.out.println(array[0][0]) System.out.println System.out System System.out array[0][0] array[0] array 0 0 String[] args args public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));

        int n = in.nextInt();

        int[][] array = new int[2][n];
        for (int i = 0; i < 2; i++)
            for (int j = 0; j < n; j++)
                array[i][j] = in.nextInt();

        for (int j = n - 2; j >= 0; j--)
            array[1][j] += array[1][j + 1];
        array[0][n - 1] += array[1][n - 1];
        for (int j = n - 2; j >= 0; j--)
            array[0][j] += Math.max(array[1][j], array[0][j + 1]);
        System.out.println(array[0][0]);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));

        int n = in.nextInt();

        int[][] array = new int[2][n];
        for (int i = 0; i < 2; i++)
            for (int j = 0; j < n; j++)
                array[i][j] = in.nextInt();

        for (int j = n - 2; j >= 0; j--)
            array[1][j] += array[1][j + 1];
        array[0][n - 1] += array[1][n - 1];
        for (int j = n - 2; j >= 0; j--)
            array[0][j] += Math.max(array[1][j], array[0][j + 1]);
        System.out.println(array[0][0]);
    }
} Main
import java.io.*;
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));

        int n = in.nextInt();

        int[][] array = new int[2][n];
        for (int i = 0; i < 2; i++)
            for (int j = 0; j < n; j++)
                array[i][j] = in.nextInt();

        for (int j = n - 2; j >= 0; j--)
            array[1][j] += array[1][j + 1];
        array[0][n - 1] += array[1][n - 1];
        for (int j = n - 2; j >= 0; j--)
            array[0][j] += Math.max(array[1][j], array[0][j + 1]);
        System.out.println(array[0][0]);
    }
}