import java.util.Scanner;

public class Main {

    static int n;
    static int[][] g;

    public static int maxPath(int i, int j){
        if(i==1 && j == n-1){
            return g[i][j];
        }
        if(i>1 || j>n-1){
            return 0;
        }

        return g[i][j] + Math.max(maxPath(i+1,j), maxPath(i,j+1));
    }

    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        g = new int[2][n];
        for(int i=0; i<2; i++){
            for(int j=0; j<n; j++){
                g[i][j] = in.nextInt();
            }
        }
        System.out.println(maxPath(0,0));

    }
} import java.util.Scanner; Scanner java.util public class Main {

    static int n;
    static int[][] g;

    public static int maxPath(int i, int j){
        if(i==1 && j == n-1){
            return g[i][j];
        }
        if(i>1 || j>n-1){
            return 0;
        }

        return g[i][j] + Math.max(maxPath(i+1,j), maxPath(i,j+1));
    }

    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        g = new int[2][n];
        for(int i=0; i<2; i++){
            for(int j=0; j<n; j++){
                g[i][j] = in.nextInt();
            }
        }
        System.out.println(maxPath(0,0));

    }
} Main static int n; n static int[][] g; g public static int maxPath(int i, int j){
        if(i==1 && j == n-1){
            return g[i][j];
        }
        if(i>1 || j>n-1){
            return 0;
        }

        return g[i][j] + Math.max(maxPath(i+1,j), maxPath(i,j+1));
    } maxPath {
        if(i==1 && j == n-1){
            return g[i][j];
        }
        if(i>1 || j>n-1){
            return 0;
        }

        return g[i][j] + Math.max(maxPath(i+1,j), maxPath(i,j+1));
    } if(i==1 && j == n-1){
            return g[i][j];
        } i==1 && j == n-1 i==1 i 1 j == n-1 j n-1 n 1 {
            return g[i][j];
        } return g[i][j]; g[i][j] g[i] g i j if(i>1 || j>n-1){
            return 0;
        } i>1 || j>n-1 i>1 i 1 j>n-1 j n-1 n 1 {
            return 0;
        } return 0; 0 return g[i][j] + Math.max(maxPath(i+1,j), maxPath(i,j+1)); g[i][j] + Math.max(maxPath(i+1,j), maxPath(i,j+1)) g[i][j] g[i] g i j Math.max(maxPath(i+1,j), maxPath(i,j+1)) Math.max Math maxPath(i+1,j) maxPath i+1 i 1 j maxPath(i,j+1) maxPath i j+1 j 1 int i i int j j public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        g = new int[2][n];
        for(int i=0; i<2; i++){
            for(int j=0; j<n; j++){
                g[i][j] = in.nextInt();
            }
        }
        System.out.println(maxPath(0,0));

    } main {
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        g = new int[2][n];
        for(int i=0; i<2; i++){
            for(int j=0; j<n; j++){
                g[i][j] = in.nextInt();
            }
        }
        System.out.println(maxPath(0,0));

    } Scanner in = new Scanner(System.in); in new Scanner(System.in) n = in.nextInt() n in.nextInt() in.nextInt in g = new int[2][n] g new int[2][n] 2 n for(int i=0; i<2; i++){
            for(int j=0; j<n; j++){
                g[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++){
                g[i][j] = in.nextInt();
            }
        } {
            for(int j=0; j<n; j++){
                g[i][j] = in.nextInt();
            }
        } for(int j=0; j<n; j++){
                g[i][j] = in.nextInt();
            } int j=0; int j=0; j 0 j<n j n j++ j++ j {
                g[i][j] = in.nextInt();
            } {
                g[i][j] = in.nextInt();
            } g[i][j] = in.nextInt() g[i][j] g[i] g i j in.nextInt() in.nextInt in System.out.println(maxPath(0,0)) System.out.println System.out System System.out maxPath(0,0) maxPath 0 0 String[] args args public class Main {

    static int n;
    static int[][] g;

    public static int maxPath(int i, int j){
        if(i==1 && j == n-1){
            return g[i][j];
        }
        if(i>1 || j>n-1){
            return 0;
        }

        return g[i][j] + Math.max(maxPath(i+1,j), maxPath(i,j+1));
    }

    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        g = new int[2][n];
        for(int i=0; i<2; i++){
            for(int j=0; j<n; j++){
                g[i][j] = in.nextInt();
            }
        }
        System.out.println(maxPath(0,0));

    }
} public class Main {

    static int n;
    static int[][] g;

    public static int maxPath(int i, int j){
        if(i==1 && j == n-1){
            return g[i][j];
        }
        if(i>1 || j>n-1){
            return 0;
        }

        return g[i][j] + Math.max(maxPath(i+1,j), maxPath(i,j+1));
    }

    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        g = new int[2][n];
        for(int i=0; i<2; i++){
            for(int j=0; j<n; j++){
                g[i][j] = in.nextInt();
            }
        }
        System.out.println(maxPath(0,0));

    }
} Main
import java.util.Scanner;

public class Main {

    static int n;
    static int[][] g;

    public static int maxPath(int i, int j){
        if(i==1 && j == n-1){
            return g[i][j];
        }
        if(i>1 || j>n-1){
            return 0;
        }

        return g[i][j] + Math.max(maxPath(i+1,j), maxPath(i,j+1));
    }

    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        g = new int[2][n];
        for(int i=0; i<2; i++){
            for(int j=0; j<n; j++){
                g[i][j] = in.nextInt();
            }
        }
        System.out.println(maxPath(0,0));

    }
}
