import java.util.*;

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

} import java.util.*; util.* java public class Main {
    public static int maxCandies(int a[][], int i, int j, int sum) {
        if(i >= 2 || j >= a[0].length) {
            return 0;
        }
        if(i == 1 && j == a[0].length - 1)
            return a[i][j];
        sum += Math.max(a[i][j] + maxCandies(a, i+1, j, sum), a[i][j] + maxCandies(a, i, j+1, sum));
        return sum;
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int a[][] = new int[2][n];
        for(int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++)
                a[i][j] = in.nextInt();
        }
        System.out.println(maxCandies(a, 0, 0, 0));
        in.close();
    }

} Main public static int maxCandies(int a[][], int i, int j, int sum) {
        if(i >= 2 || j >= a[0].length) {
            return 0;
        }
        if(i == 1 && j == a[0].length - 1)
            return a[i][j];
        sum += Math.max(a[i][j] + maxCandies(a, i+1, j, sum), a[i][j] + maxCandies(a, i, j+1, sum));
        return sum;
    } maxCandies {
        if(i >= 2 || j >= a[0].length) {
            return 0;
        }
        if(i == 1 && j == a[0].length - 1)
            return a[i][j];
        sum += Math.max(a[i][j] + maxCandies(a, i+1, j, sum), a[i][j] + maxCandies(a, i, j+1, sum));
        return sum;
    } if(i >= 2 || j >= a[0].length) {
            return 0;
        } i >= 2 || j >= a[0].length i >= 2 i 2 j >= a[0].length j a[0].length a[0] a 0 a[0].length {
            return 0;
        } return 0; 0 if(i == 1 && j == a[0].length - 1)
            return a[i][j]; i == 1 && j == a[0].length - 1 i == 1 i 1 j == a[0].length - 1 j a[0].length - 1 a[0].length a[0] a 0 a[0].length 1 return a[i][j]; a[i][j] a[i] a i j sum += Math.max(a[i][j] + maxCandies(a, i+1, j, sum), a[i][j] + maxCandies(a, i, j+1, sum)) sum Math.max(a[i][j] + maxCandies(a, i+1, j, sum), a[i][j] + maxCandies(a, i, j+1, sum)) Math.max Math a[i][j] + maxCandies(a, i+1, j, sum) a[i][j] a[i] a i j maxCandies(a, i+1, j, sum) maxCandies a i+1 i 1 j sum a[i][j] + maxCandies(a, i, j+1, sum) a[i][j] a[i] a i j maxCandies(a, i, j+1, sum) maxCandies a i j+1 j 1 sum return sum; sum int a[][] a int i i int j j int sum sum public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int a[][] = new int[2][n];
        for(int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++)
                a[i][j] = in.nextInt();
        }
        System.out.println(maxCandies(a, 0, 0, 0));
        in.close();
    } main {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int a[][] = new int[2][n];
        for(int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++)
                a[i][j] = in.nextInt();
        }
        System.out.println(maxCandies(a, 0, 0, 0));
        in.close();
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = in.nextInt(); n in.nextInt() in.nextInt in int a[][] = new int[2][n]; a new int[2][n] 2 n for(int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++)
                a[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++)
                a[i][j] = in.nextInt();
        } {
            for (int j = 0; j < n; j++)
                a[i][j] = in.nextInt();
        } for (int j = 0; j < n; j++)
                a[i][j] = in.nextInt(); int j = 0; int j = 0; j 0 j < n j n j++ j++ j a[i][j] = in.nextInt(); a[i][j] = in.nextInt() a[i][j] a[i] a i j in.nextInt() in.nextInt in System.out.println(maxCandies(a, 0, 0, 0)) System.out.println System.out System System.out maxCandies(a, 0, 0, 0) maxCandies a 0 0 0 in.close() in.close in String[] args args public class Main {
    public static int maxCandies(int a[][], int i, int j, int sum) {
        if(i >= 2 || j >= a[0].length) {
            return 0;
        }
        if(i == 1 && j == a[0].length - 1)
            return a[i][j];
        sum += Math.max(a[i][j] + maxCandies(a, i+1, j, sum), a[i][j] + maxCandies(a, i, j+1, sum));
        return sum;
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int a[][] = new int[2][n];
        for(int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++)
                a[i][j] = in.nextInt();
        }
        System.out.println(maxCandies(a, 0, 0, 0));
        in.close();
    }

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

} Main
import java.util.*;

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

}