import java.util.*;

public class Main {
    static int MAX_COUNT = 0;
    static int[][] grid;
    static int n;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        grid = new int[2][n];
        for(int row = 0; row < 2; row++) {
            for(int col = 0; col < n; col++) {
                grid[row][col] = sc.nextInt();
            }
        }
        count(0, 0, 0);
        System.out.println(MAX_COUNT);
    }

    public static void count(int currentCount, int row, int col) {
        if(row >= 2 || col >= n) return;
        if(row == 1 && col == n-1) {
            MAX_COUNT = Math.max(currentCount + grid[row][col], MAX_COUNT);
            return;
        }
        count(currentCount + grid[row][col], row+1, col);
        count(currentCount + grid[row][col], row, col+1);
        return;
    }
} import java.util.*; util.* java public class Main {
    static int MAX_COUNT = 0;
    static int[][] grid;
    static int n;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        grid = new int[2][n];
        for(int row = 0; row < 2; row++) {
            for(int col = 0; col < n; col++) {
                grid[row][col] = sc.nextInt();
            }
        }
        count(0, 0, 0);
        System.out.println(MAX_COUNT);
    }

    public static void count(int currentCount, int row, int col) {
        if(row >= 2 || col >= n) return;
        if(row == 1 && col == n-1) {
            MAX_COUNT = Math.max(currentCount + grid[row][col], MAX_COUNT);
            return;
        }
        count(currentCount + grid[row][col], row+1, col);
        count(currentCount + grid[row][col], row, col+1);
        return;
    }
} Main static int MAX_COUNT = 0; MAX_COUNT 0 static int[][] grid; grid static int n; n public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        grid = new int[2][n];
        for(int row = 0; row < 2; row++) {
            for(int col = 0; col < n; col++) {
                grid[row][col] = sc.nextInt();
            }
        }
        count(0, 0, 0);
        System.out.println(MAX_COUNT);
    } main {
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        grid = new int[2][n];
        for(int row = 0; row < 2; row++) {
            for(int col = 0; col < n; col++) {
                grid[row][col] = sc.nextInt();
            }
        }
        count(0, 0, 0);
        System.out.println(MAX_COUNT);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) n = sc.nextInt() n sc.nextInt() sc.nextInt sc grid = new int[2][n] grid new int[2][n] 2 n for(int row = 0; row < 2; row++) {
            for(int col = 0; col < n; col++) {
                grid[row][col] = sc.nextInt();
            }
        } int row = 0; int row = 0; row 0 row < 2 row 2 row++ row++ row {
            for(int col = 0; col < n; col++) {
                grid[row][col] = sc.nextInt();
            }
        } {
            for(int col = 0; col < n; col++) {
                grid[row][col] = sc.nextInt();
            }
        } for(int col = 0; col < n; col++) {
                grid[row][col] = sc.nextInt();
            } int col = 0; int col = 0; col 0 col < n col n col++ col++ col {
                grid[row][col] = sc.nextInt();
            } {
                grid[row][col] = sc.nextInt();
            } grid[row][col] = sc.nextInt() grid[row][col] grid[row] grid row col sc.nextInt() sc.nextInt sc count(0, 0, 0) count 0 0 0 System.out.println(MAX_COUNT) System.out.println System.out System System.out MAX_COUNT String[] args args public static void count(int currentCount, int row, int col) {
        if(row >= 2 || col >= n) return;
        if(row == 1 && col == n-1) {
            MAX_COUNT = Math.max(currentCount + grid[row][col], MAX_COUNT);
            return;
        }
        count(currentCount + grid[row][col], row+1, col);
        count(currentCount + grid[row][col], row, col+1);
        return;
    } count {
        if(row >= 2 || col >= n) return;
        if(row == 1 && col == n-1) {
            MAX_COUNT = Math.max(currentCount + grid[row][col], MAX_COUNT);
            return;
        }
        count(currentCount + grid[row][col], row+1, col);
        count(currentCount + grid[row][col], row, col+1);
        return;
    } if(row >= 2 || col >= n) return; row >= 2 || col >= n row >= 2 row 2 col >= n col n return; if(row == 1 && col == n-1) {
            MAX_COUNT = Math.max(currentCount + grid[row][col], MAX_COUNT);
            return;
        } row == 1 && col == n-1 row == 1 row 1 col == n-1 col n-1 n 1 {
            MAX_COUNT = Math.max(currentCount + grid[row][col], MAX_COUNT);
            return;
        } MAX_COUNT = Math.max(currentCount + grid[row][col], MAX_COUNT) MAX_COUNT Math.max(currentCount + grid[row][col], MAX_COUNT) Math.max Math currentCount + grid[row][col] currentCount grid[row][col] grid[row] grid row col MAX_COUNT return; count(currentCount + grid[row][col], row+1, col) count currentCount + grid[row][col] currentCount grid[row][col] grid[row] grid row col row+1 row 1 col count(currentCount + grid[row][col], row, col+1) count currentCount + grid[row][col] currentCount grid[row][col] grid[row] grid row col row col+1 col 1 return; int currentCount currentCount int row row int col col public class Main {
    static int MAX_COUNT = 0;
    static int[][] grid;
    static int n;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        grid = new int[2][n];
        for(int row = 0; row < 2; row++) {
            for(int col = 0; col < n; col++) {
                grid[row][col] = sc.nextInt();
            }
        }
        count(0, 0, 0);
        System.out.println(MAX_COUNT);
    }

    public static void count(int currentCount, int row, int col) {
        if(row >= 2 || col >= n) return;
        if(row == 1 && col == n-1) {
            MAX_COUNT = Math.max(currentCount + grid[row][col], MAX_COUNT);
            return;
        }
        count(currentCount + grid[row][col], row+1, col);
        count(currentCount + grid[row][col], row, col+1);
        return;
    }
} public class Main {
    static int MAX_COUNT = 0;
    static int[][] grid;
    static int n;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        grid = new int[2][n];
        for(int row = 0; row < 2; row++) {
            for(int col = 0; col < n; col++) {
                grid[row][col] = sc.nextInt();
            }
        }
        count(0, 0, 0);
        System.out.println(MAX_COUNT);
    }

    public static void count(int currentCount, int row, int col) {
        if(row >= 2 || col >= n) return;
        if(row == 1 && col == n-1) {
            MAX_COUNT = Math.max(currentCount + grid[row][col], MAX_COUNT);
            return;
        }
        count(currentCount + grid[row][col], row+1, col);
        count(currentCount + grid[row][col], row, col+1);
        return;
    }
} Main
import java.util.*;

public class Main {
    static int MAX_COUNT = 0;
    static int[][] grid;
    static int n;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        grid = new int[2][n];
        for(int row = 0; row < 2; row++) {
            for(int col = 0; col < n; col++) {
                grid[row][col] = sc.nextInt();
            }
        }
        count(0, 0, 0);
        System.out.println(MAX_COUNT);
    }

    public static void count(int currentCount, int row, int col) {
        if(row >= 2 || col >= n) return;
        if(row == 1 && col == n-1) {
            MAX_COUNT = Math.max(currentCount + grid[row][col], MAX_COUNT);
            return;
        }
        count(currentCount + grid[row][col], row+1, col);
        count(currentCount + grid[row][col], row, col+1);
        return;
    }
}