import java.util.Scanner;

public class Main {

	static int max = -1;
	static int[][] a;

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

	public static void dfs(int x, int y, int sum, int n) {
		if(x == 1 && y == n - 1) {
			max = Math.max(max, sum);
			return;
		}
		if(0 <= x + 1 && x + 1 < 2 && 0 <= y && y < n) {
			dfs(x + 1, y, sum + a[x + 1][y], n);
		}
		if(0 <= x && x < 2 && 0 <= y + 1 && y + 1 < n) {
			dfs(x, y + 1, sum + a[x][y + 1], n);
		}
	}

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

	static int max = -1;
	static int[][] a;

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

	public static void dfs(int x, int y, int sum, int n) {
		if(x == 1 && y == n - 1) {
			max = Math.max(max, sum);
			return;
		}
		if(0 <= x + 1 && x + 1 < 2 && 0 <= y && y < n) {
			dfs(x + 1, y, sum + a[x + 1][y], n);
		}
		if(0 <= x && x < 2 && 0 <= y + 1 && y + 1 < n) {
			dfs(x, y + 1, sum + a[x][y + 1], n);
		}
	}

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

	static int max = -1;
	static int[][] a;

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

	public static void dfs(int x, int y, int sum, int n) {
		if(x == 1 && y == n - 1) {
			max = Math.max(max, sum);
			return;
		}
		if(0 <= x + 1 && x + 1 < 2 && 0 <= y && y < n) {
			dfs(x + 1, y, sum + a[x + 1][y], n);
		}
		if(0 <= x && x < 2 && 0 <= y + 1 && y + 1 < n) {
			dfs(x, y + 1, sum + a[x][y + 1], n);
		}
	}

} public class Main {

	static int max = -1;
	static int[][] a;

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

	public static void dfs(int x, int y, int sum, int n) {
		if(x == 1 && y == n - 1) {
			max = Math.max(max, sum);
			return;
		}
		if(0 <= x + 1 && x + 1 < 2 && 0 <= y && y < n) {
			dfs(x + 1, y, sum + a[x + 1][y], n);
		}
		if(0 <= x && x < 2 && 0 <= y + 1 && y + 1 < n) {
			dfs(x, y + 1, sum + a[x][y + 1], n);
		}
	}

} Main
import java.util.Scanner;

public class Main {

	static int max = -1;
	static int[][] a;

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

	public static void dfs(int x, int y, int sum, int n) {
		if(x == 1 && y == n - 1) {
			max = Math.max(max, sum);
			return;
		}
		if(0 <= x + 1 && x + 1 < 2 && 0 <= y && y < n) {
			dfs(x + 1, y, sum + a[x + 1][y], n);
		}
		if(0 <= x && x < 2 && 0 <= y + 1 && y + 1 < n) {
			dfs(x, y + 1, sum + a[x][y + 1], n);
		}
	}

}
