import java.util.Scanner;

public class Main {

	static int n;
	static int[][] a;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		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();
			}
		}
		int ans = dfs(0, 0);
		System.out.println(ans);
	}

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

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

	static int n;
	static int[][] a;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		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();
			}
		}
		int ans = dfs(0, 0);
		System.out.println(ans);
	}

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

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

	static int n;
	static int[][] a;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		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();
			}
		}
		int ans = dfs(0, 0);
		System.out.println(ans);
	}

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

} public class Main {

	static int n;
	static int[][] a;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		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();
			}
		}
		int ans = dfs(0, 0);
		System.out.println(ans);
	}

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

} Main
import java.util.Scanner;

public class Main {

	static int n;
	static int[][] a;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		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();
			}
		}
		int ans = dfs(0, 0);
		System.out.println(ans);
	}

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

}
