import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());

        int[][] values = new int[2][n];
        int[][] valuesSum = new int[2][n];

        StringTokenizer tokenizer;

        for (int i = 0; i < 2; i++) {
            tokenizer = new StringTokenizer(input.readLine());
            for (int j = 0; j < n; j++) {
                values[i][j] = Integer.parseInt(tokenizer.nextToken());
            }
        }

        valuesSum[0][0] = values[0][0];

        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                    valuesSum[i][j] = values[i][j] + Math.max(getValues(i - 1, j, valuesSum), getValues(i, j - 1, valuesSum));
            }
        }

        System.out.println(valuesSum[1][n- 1]);

    }



    public static boolean checkIndex (int x, int y, int n){
        return x > -1 && y > -1 && x < 2 && y < n;
    }

    public static int getValues(int x, int y, int [][] values){

        if (checkIndex(x, y, values[0].length)){
            return values[x][y];
        }

        return 0;

    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.StringTokenizer; StringTokenizer java.util public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());

        int[][] values = new int[2][n];
        int[][] valuesSum = new int[2][n];

        StringTokenizer tokenizer;

        for (int i = 0; i < 2; i++) {
            tokenizer = new StringTokenizer(input.readLine());
            for (int j = 0; j < n; j++) {
                values[i][j] = Integer.parseInt(tokenizer.nextToken());
            }
        }

        valuesSum[0][0] = values[0][0];

        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                    valuesSum[i][j] = values[i][j] + Math.max(getValues(i - 1, j, valuesSum), getValues(i, j - 1, valuesSum));
            }
        }

        System.out.println(valuesSum[1][n- 1]);

    }



    public static boolean checkIndex (int x, int y, int n){
        return x > -1 && y > -1 && x < 2 && y < n;
    }

    public static int getValues(int x, int y, int [][] values){

        if (checkIndex(x, y, values[0].length)){
            return values[x][y];
        }

        return 0;

    }
} Main public static void main(String[] args) throws Exception {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());

        int[][] values = new int[2][n];
        int[][] valuesSum = new int[2][n];

        StringTokenizer tokenizer;

        for (int i = 0; i < 2; i++) {
            tokenizer = new StringTokenizer(input.readLine());
            for (int j = 0; j < n; j++) {
                values[i][j] = Integer.parseInt(tokenizer.nextToken());
            }
        }

        valuesSum[0][0] = values[0][0];

        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                    valuesSum[i][j] = values[i][j] + Math.max(getValues(i - 1, j, valuesSum), getValues(i, j - 1, valuesSum));
            }
        }

        System.out.println(valuesSum[1][n- 1]);

    } main {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());

        int[][] values = new int[2][n];
        int[][] valuesSum = new int[2][n];

        StringTokenizer tokenizer;

        for (int i = 0; i < 2; i++) {
            tokenizer = new StringTokenizer(input.readLine());
            for (int j = 0; j < n; j++) {
                values[i][j] = Integer.parseInt(tokenizer.nextToken());
            }
        }

        valuesSum[0][0] = values[0][0];

        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                    valuesSum[i][j] = values[i][j] + Math.max(getValues(i - 1, j, valuesSum), getValues(i, j - 1, valuesSum));
            }
        }

        System.out.println(valuesSum[1][n- 1]);

    } BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); input new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(input.readLine()); n Integer.parseInt(input.readLine()) Integer.parseInt Integer input.readLine() input.readLine input int[][] values = new int[2][n]; values new int[2][n] 2 n int[][] valuesSum = new int[2][n]; valuesSum new int[2][n] 2 n StringTokenizer tokenizer; tokenizer for (int i = 0; i < 2; i++) {
            tokenizer = new StringTokenizer(input.readLine());
            for (int j = 0; j < n; j++) {
                values[i][j] = Integer.parseInt(tokenizer.nextToken());
            }
        } int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
            tokenizer = new StringTokenizer(input.readLine());
            for (int j = 0; j < n; j++) {
                values[i][j] = Integer.parseInt(tokenizer.nextToken());
            }
        } {
            tokenizer = new StringTokenizer(input.readLine());
            for (int j = 0; j < n; j++) {
                values[i][j] = Integer.parseInt(tokenizer.nextToken());
            }
        } tokenizer = new StringTokenizer(input.readLine()) tokenizer new StringTokenizer(input.readLine()) for (int j = 0; j < n; j++) {
                values[i][j] = Integer.parseInt(tokenizer.nextToken());
            } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
                values[i][j] = Integer.parseInt(tokenizer.nextToken());
            } {
                values[i][j] = Integer.parseInt(tokenizer.nextToken());
            } values[i][j] = Integer.parseInt(tokenizer.nextToken()) values[i][j] values[i] values i j Integer.parseInt(tokenizer.nextToken()) Integer.parseInt Integer tokenizer.nextToken() tokenizer.nextToken tokenizer valuesSum[0][0] = values[0][0] valuesSum[0][0] valuesSum[0] valuesSum 0 0 values[0][0] values[0] values 0 0 for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                    valuesSum[i][j] = values[i][j] + Math.max(getValues(i - 1, j, valuesSum), getValues(i, j - 1, valuesSum));
            }
        } int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
            for (int j = 0; j < n; j++) {
                    valuesSum[i][j] = values[i][j] + Math.max(getValues(i - 1, j, valuesSum), getValues(i, j - 1, valuesSum));
            }
        } {
            for (int j = 0; j < n; j++) {
                    valuesSum[i][j] = values[i][j] + Math.max(getValues(i - 1, j, valuesSum), getValues(i, j - 1, valuesSum));
            }
        } for (int j = 0; j < n; j++) {
                    valuesSum[i][j] = values[i][j] + Math.max(getValues(i - 1, j, valuesSum), getValues(i, j - 1, valuesSum));
            } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
                    valuesSum[i][j] = values[i][j] + Math.max(getValues(i - 1, j, valuesSum), getValues(i, j - 1, valuesSum));
            } {
                    valuesSum[i][j] = values[i][j] + Math.max(getValues(i - 1, j, valuesSum), getValues(i, j - 1, valuesSum));
            } valuesSum[i][j] = values[i][j] + Math.max(getValues(i - 1, j, valuesSum), getValues(i, j - 1, valuesSum)) valuesSum[i][j] valuesSum[i] valuesSum i j values[i][j] + Math.max(getValues(i - 1, j, valuesSum), getValues(i, j - 1, valuesSum)) values[i][j] values[i] values i j Math.max(getValues(i - 1, j, valuesSum), getValues(i, j - 1, valuesSum)) Math.max Math getValues(i - 1, j, valuesSum) getValues i - 1 i 1 j valuesSum getValues(i, j - 1, valuesSum) getValues i j - 1 j 1 valuesSum System.out.println(valuesSum[1][n- 1]) System.out.println System.out System System.out valuesSum[1][n- 1] valuesSum[1] valuesSum 1 n- 1 n 1 String[] args args public static boolean checkIndex (int x, int y, int n){
        return x > -1 && y > -1 && x < 2 && y < n;
    } checkIndex {
        return x > -1 && y > -1 && x < 2 && y < n;
    } return x > -1 && y > -1 && x < 2 && y < n; x > -1 && y > -1 && x < 2 && y < n x < 2 x > -1 && y > -1 && x < 2 && y < n x > -1 x -1 1 y > -1 y -1 1 x < 2 x 2 y < n y n int x x int y y int n n public static int getValues(int x, int y, int [][] values){

        if (checkIndex(x, y, values[0].length)){
            return values[x][y];
        }

        return 0;

    } getValues {

        if (checkIndex(x, y, values[0].length)){
            return values[x][y];
        }

        return 0;

    } if (checkIndex(x, y, values[0].length)){
            return values[x][y];
        } checkIndex(x, y, values[0].length) checkIndex x y values[0].length values[0] values 0 values[0].length {
            return values[x][y];
        } return values[x][y]; values[x][y] values[x] values x y return 0; 0 int x x int y y int [][] values values public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());

        int[][] values = new int[2][n];
        int[][] valuesSum = new int[2][n];

        StringTokenizer tokenizer;

        for (int i = 0; i < 2; i++) {
            tokenizer = new StringTokenizer(input.readLine());
            for (int j = 0; j < n; j++) {
                values[i][j] = Integer.parseInt(tokenizer.nextToken());
            }
        }

        valuesSum[0][0] = values[0][0];

        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                    valuesSum[i][j] = values[i][j] + Math.max(getValues(i - 1, j, valuesSum), getValues(i, j - 1, valuesSum));
            }
        }

        System.out.println(valuesSum[1][n- 1]);

    }



    public static boolean checkIndex (int x, int y, int n){
        return x > -1 && y > -1 && x < 2 && y < n;
    }

    public static int getValues(int x, int y, int [][] values){

        if (checkIndex(x, y, values[0].length)){
            return values[x][y];
        }

        return 0;

    }
} public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());

        int[][] values = new int[2][n];
        int[][] valuesSum = new int[2][n];

        StringTokenizer tokenizer;

        for (int i = 0; i < 2; i++) {
            tokenizer = new StringTokenizer(input.readLine());
            for (int j = 0; j < n; j++) {
                values[i][j] = Integer.parseInt(tokenizer.nextToken());
            }
        }

        valuesSum[0][0] = values[0][0];

        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                    valuesSum[i][j] = values[i][j] + Math.max(getValues(i - 1, j, valuesSum), getValues(i, j - 1, valuesSum));
            }
        }

        System.out.println(valuesSum[1][n- 1]);

    }



    public static boolean checkIndex (int x, int y, int n){
        return x > -1 && y > -1 && x < 2 && y < n;
    }

    public static int getValues(int x, int y, int [][] values){

        if (checkIndex(x, y, values[0].length)){
            return values[x][y];
        }

        return 0;

    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(input.readLine());

        int[][] values = new int[2][n];
        int[][] valuesSum = new int[2][n];

        StringTokenizer tokenizer;

        for (int i = 0; i < 2; i++) {
            tokenizer = new StringTokenizer(input.readLine());
            for (int j = 0; j < n; j++) {
                values[i][j] = Integer.parseInt(tokenizer.nextToken());
            }
        }

        valuesSum[0][0] = values[0][0];

        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                    valuesSum[i][j] = values[i][j] + Math.max(getValues(i - 1, j, valuesSum), getValues(i, j - 1, valuesSum));
            }
        }

        System.out.println(valuesSum[1][n- 1]);

    }



    public static boolean checkIndex (int x, int y, int n){
        return x > -1 && y > -1 && x < 2 && y < n;
    }

    public static int getValues(int x, int y, int [][] values){

        if (checkIndex(x, y, values[0].length)){
            return values[x][y];
        }

        return 0;

    }
}
