import java.util.Scanner;

public class Main {
	static int INF = Integer.MAX_VALUE / 2;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

		int[][] adj = new int[2][N];

		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < N; j++) {
				adj[i][j] = sc.nextInt();
			}
		}
		System.out.println(dfs(adj, 0, 0, N));
	}

	static int dfs(int[][] adj, int i, int j, int N) {
		if(i == 1 && j >= N - 1) return adj[i][j];

		if(i == 1 && j < N-1) {
			return adj[i][j] + dfs(adj, i, j+1, N);
		} else if(i==0 && j >= N-1) {
			return adj[i][j] + dfs(adj, i+1, j, N);
		} else {
			return adj[i][j] + Math.max(dfs(adj, i+1, j, N), dfs(adj, i, j+1, N));
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	static int INF = Integer.MAX_VALUE / 2;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

		int[][] adj = new int[2][N];

		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < N; j++) {
				adj[i][j] = sc.nextInt();
			}
		}
		System.out.println(dfs(adj, 0, 0, N));
	}

	static int dfs(int[][] adj, int i, int j, int N) {
		if(i == 1 && j >= N - 1) return adj[i][j];

		if(i == 1 && j < N-1) {
			return adj[i][j] + dfs(adj, i, j+1, N);
		} else if(i==0 && j >= N-1) {
			return adj[i][j] + dfs(adj, i+1, j, N);
		} else {
			return adj[i][j] + Math.max(dfs(adj, i+1, j, N), dfs(adj, i, j+1, N));
		}
	}
} Main static int INF = Integer.MAX_VALUE / 2; INF Integer.MAX_VALUE / 2 Integer.MAX_VALUE Integer Integer.MAX_VALUE 2 public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

		int[][] adj = new int[2][N];

		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < N; j++) {
				adj[i][j] = sc.nextInt();
			}
		}
		System.out.println(dfs(adj, 0, 0, N));
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

		int[][] adj = new int[2][N];

		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < N; j++) {
				adj[i][j] = sc.nextInt();
			}
		}
		System.out.println(dfs(adj, 0, 0, N));
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[][] adj = new int[2][N]; adj new int[2][N] 2 N for(int i = 0; i < 2; i++) {
			for(int j = 0; j < N; j++) {
				adj[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++) {
				adj[i][j] = sc.nextInt();
			}
		} {
			for(int j = 0; j < N; j++) {
				adj[i][j] = sc.nextInt();
			}
		} for(int j = 0; j < N; j++) {
				adj[i][j] = sc.nextInt();
			} int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
				adj[i][j] = sc.nextInt();
			} {
				adj[i][j] = sc.nextInt();
			} adj[i][j] = sc.nextInt() adj[i][j] adj[i] adj i j sc.nextInt() sc.nextInt sc System.out.println(dfs(adj, 0, 0, N)) System.out.println System.out System System.out dfs(adj, 0, 0, N) dfs adj 0 0 N String[] args args static int dfs(int[][] adj, int i, int j, int N) {
		if(i == 1 && j >= N - 1) return adj[i][j];

		if(i == 1 && j < N-1) {
			return adj[i][j] + dfs(adj, i, j+1, N);
		} else if(i==0 && j >= N-1) {
			return adj[i][j] + dfs(adj, i+1, j, N);
		} else {
			return adj[i][j] + Math.max(dfs(adj, i+1, j, N), dfs(adj, i, j+1, N));
		}
	} dfs {
		if(i == 1 && j >= N - 1) return adj[i][j];

		if(i == 1 && j < N-1) {
			return adj[i][j] + dfs(adj, i, j+1, N);
		} else if(i==0 && j >= N-1) {
			return adj[i][j] + dfs(adj, i+1, j, N);
		} else {
			return adj[i][j] + Math.max(dfs(adj, i+1, j, N), dfs(adj, i, j+1, N));
		}
	} if(i == 1 && j >= N - 1) return adj[i][j]; i == 1 && j >= N - 1 i == 1 i 1 j >= N - 1 j N - 1 N 1 return adj[i][j]; adj[i][j] adj[i] adj i j if(i == 1 && j < N-1) {
			return adj[i][j] + dfs(adj, i, j+1, N);
		} else if(i==0 && j >= N-1) {
			return adj[i][j] + dfs(adj, i+1, j, N);
		} else {
			return adj[i][j] + Math.max(dfs(adj, i+1, j, N), dfs(adj, i, j+1, N));
		} i == 1 && j < N-1 i == 1 i 1 j < N-1 j N-1 N 1 {
			return adj[i][j] + dfs(adj, i, j+1, N);
		} return adj[i][j] + dfs(adj, i, j+1, N); adj[i][j] + dfs(adj, i, j+1, N) adj[i][j] adj[i] adj i j dfs(adj, i, j+1, N) dfs adj i j+1 j 1 N if(i==0 && j >= N-1) {
			return adj[i][j] + dfs(adj, i+1, j, N);
		} else {
			return adj[i][j] + Math.max(dfs(adj, i+1, j, N), dfs(adj, i, j+1, N));
		} i==0 && j >= N-1 i==0 i 0 j >= N-1 j N-1 N 1 {
			return adj[i][j] + dfs(adj, i+1, j, N);
		} return adj[i][j] + dfs(adj, i+1, j, N); adj[i][j] + dfs(adj, i+1, j, N) adj[i][j] adj[i] adj i j dfs(adj, i+1, j, N) dfs adj i+1 i 1 j N {
			return adj[i][j] + Math.max(dfs(adj, i+1, j, N), dfs(adj, i, j+1, N));
		} return adj[i][j] + Math.max(dfs(adj, i+1, j, N), dfs(adj, i, j+1, N)); adj[i][j] + Math.max(dfs(adj, i+1, j, N), dfs(adj, i, j+1, N)) adj[i][j] adj[i] adj i j Math.max(dfs(adj, i+1, j, N), dfs(adj, i, j+1, N)) Math.max Math dfs(adj, i+1, j, N) dfs adj i+1 i 1 j N dfs(adj, i, j+1, N) dfs adj i j+1 j 1 N int[][] adj adj int i i int j j int N N public class Main {
	static int INF = Integer.MAX_VALUE / 2;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

		int[][] adj = new int[2][N];

		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < N; j++) {
				adj[i][j] = sc.nextInt();
			}
		}
		System.out.println(dfs(adj, 0, 0, N));
	}

	static int dfs(int[][] adj, int i, int j, int N) {
		if(i == 1 && j >= N - 1) return adj[i][j];

		if(i == 1 && j < N-1) {
			return adj[i][j] + dfs(adj, i, j+1, N);
		} else if(i==0 && j >= N-1) {
			return adj[i][j] + dfs(adj, i+1, j, N);
		} else {
			return adj[i][j] + Math.max(dfs(adj, i+1, j, N), dfs(adj, i, j+1, N));
		}
	}
} public class Main {
	static int INF = Integer.MAX_VALUE / 2;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

		int[][] adj = new int[2][N];

		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < N; j++) {
				adj[i][j] = sc.nextInt();
			}
		}
		System.out.println(dfs(adj, 0, 0, N));
	}

	static int dfs(int[][] adj, int i, int j, int N) {
		if(i == 1 && j >= N - 1) return adj[i][j];

		if(i == 1 && j < N-1) {
			return adj[i][j] + dfs(adj, i, j+1, N);
		} else if(i==0 && j >= N-1) {
			return adj[i][j] + dfs(adj, i+1, j, N);
		} else {
			return adj[i][j] + Math.max(dfs(adj, i+1, j, N), dfs(adj, i, j+1, N));
		}
	}
} Main
import java.util.Scanner;

public class Main {
	static int INF = Integer.MAX_VALUE / 2;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

		int[][] adj = new int[2][N];

		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < N; j++) {
				adj[i][j] = sc.nextInt();
			}
		}
		System.out.println(dfs(adj, 0, 0, N));
	}

	static int dfs(int[][] adj, int i, int j, int N) {
		if(i == 1 && j >= N - 1) return adj[i][j];

		if(i == 1 && j < N-1) {
			return adj[i][j] + dfs(adj, i, j+1, N);
		} else if(i==0 && j >= N-1) {
			return adj[i][j] + dfs(adj, i+1, j, N);
		} else {
			return adj[i][j] + Math.max(dfs(adj, i+1, j, N), dfs(adj, i, j+1, N));
		}
	}
}