import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	static Scanner scanner = new Scanner(System.in);
	static int n = scanner.nextInt();
	static int a[][] = new int[2][n];

	@SuppressWarnings("resource")
	public static void main(String args[]) {

		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < n; j++) {
				a[i][j] = scanner.nextInt();
			}
		}

		dfs(0, 0, a[0][0]);

		int max = 0;
		for (int i = 0; i < scores.size(); i++) {
			max = Math.max(scores.get(i), max);
		}

		System.out.println(max);
	}

	static List<Integer> scores = new ArrayList<>();

	private static void dfs(int x, int y, int score) {
		if (x == n - 1 && y == 1) {
			scores.add(score);
			return;
		}

		try {
			score += a[y + 1][x];
			dfs(x, y + 1, score);
			score -= a[y + 1][x];
		} catch (Exception e) {

		}
		try {
			score += a[y][x + 1];
			dfs(x + 1, y, score);
		} catch (Exception e) {

		}

	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
	static Scanner scanner = new Scanner(System.in);
	static int n = scanner.nextInt();
	static int a[][] = new int[2][n];

	@SuppressWarnings("resource")
	public static void main(String args[]) {

		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < n; j++) {
				a[i][j] = scanner.nextInt();
			}
		}

		dfs(0, 0, a[0][0]);

		int max = 0;
		for (int i = 0; i < scores.size(); i++) {
			max = Math.max(scores.get(i), max);
		}

		System.out.println(max);
	}

	static List<Integer> scores = new ArrayList<>();

	private static void dfs(int x, int y, int score) {
		if (x == n - 1 && y == 1) {
			scores.add(score);
			return;
		}

		try {
			score += a[y + 1][x];
			dfs(x, y + 1, score);
			score -= a[y + 1][x];
		} catch (Exception e) {

		}
		try {
			score += a[y][x + 1];
			dfs(x + 1, y, score);
		} catch (Exception e) {

		}

	}
} Main static Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) static int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner static int a[][] = new int[2][n]; a new int[2][n] 2 n static List<Integer> scores = new ArrayList<>(); scores new ArrayList<>() @SuppressWarnings("resource")
	public static void main(String args[]) {

		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < n; j++) {
				a[i][j] = scanner.nextInt();
			}
		}

		dfs(0, 0, a[0][0]);

		int max = 0;
		for (int i = 0; i < scores.size(); i++) {
			max = Math.max(scores.get(i), max);
		}

		System.out.println(max);
	} main {

		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < n; j++) {
				a[i][j] = scanner.nextInt();
			}
		}

		dfs(0, 0, a[0][0]);

		int max = 0;
		for (int i = 0; i < scores.size(); i++) {
			max = Math.max(scores.get(i), max);
		}

		System.out.println(max);
	} for (int i = 0; i < 2; i++) {
			for (int j = 0; j < n; j++) {
				a[i][j] = scanner.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] = scanner.nextInt();
			}
		} {
			for (int j = 0; j < n; j++) {
				a[i][j] = scanner.nextInt();
			}
		} for (int j = 0; j < n; j++) {
				a[i][j] = scanner.nextInt();
			} int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
				a[i][j] = scanner.nextInt();
			} {
				a[i][j] = scanner.nextInt();
			} a[i][j] = scanner.nextInt() a[i][j] a[i] a i j scanner.nextInt() scanner.nextInt scanner dfs(0, 0, a[0][0]) dfs 0 0 a[0][0] a[0] a 0 0 int max = 0; max 0 for (int i = 0; i < scores.size(); i++) {
			max = Math.max(scores.get(i), max);
		} int i = 0; int i = 0; i 0 i < scores.size() i scores.size() scores.size scores i++ i++ i {
			max = Math.max(scores.get(i), max);
		} {
			max = Math.max(scores.get(i), max);
		} max = Math.max(scores.get(i), max) max Math.max(scores.get(i), max) Math.max Math scores.get(i) scores.get scores i max System.out.println(max) System.out.println System.out System System.out max String args[] args private static void dfs(int x, int y, int score) {
		if (x == n - 1 && y == 1) {
			scores.add(score);
			return;
		}

		try {
			score += a[y + 1][x];
			dfs(x, y + 1, score);
			score -= a[y + 1][x];
		} catch (Exception e) {

		}
		try {
			score += a[y][x + 1];
			dfs(x + 1, y, score);
		} catch (Exception e) {

		}

	} dfs {
		if (x == n - 1 && y == 1) {
			scores.add(score);
			return;
		}

		try {
			score += a[y + 1][x];
			dfs(x, y + 1, score);
			score -= a[y + 1][x];
		} catch (Exception e) {

		}
		try {
			score += a[y][x + 1];
			dfs(x + 1, y, score);
		} catch (Exception e) {

		}

	} if (x == n - 1 && y == 1) {
			scores.add(score);
			return;
		} x == n - 1 && y == 1 x == n - 1 x n - 1 n 1 y == 1 y 1 {
			scores.add(score);
			return;
		} scores.add(score) scores.add scores score return; try {
			score += a[y + 1][x];
			dfs(x, y + 1, score);
			score -= a[y + 1][x];
		} catch (Exception e) {

		} catch (Exception e) {

		} Exception e {

		} {
			score += a[y + 1][x];
			dfs(x, y + 1, score);
			score -= a[y + 1][x];
		} score += a[y + 1][x] score a[y + 1][x] a[y + 1] a y + 1 y 1 x dfs(x, y + 1, score) dfs x y + 1 y 1 score score -= a[y + 1][x] score a[y + 1][x] a[y + 1] a y + 1 y 1 x try {
			score += a[y][x + 1];
			dfs(x + 1, y, score);
		} catch (Exception e) {

		} catch (Exception e) {

		} Exception e {

		} {
			score += a[y][x + 1];
			dfs(x + 1, y, score);
		} score += a[y][x + 1] score a[y][x + 1] a[y] a y x + 1 x 1 dfs(x + 1, y, score) dfs x + 1 x 1 y score int x x int y y int score score public class Main {
	static Scanner scanner = new Scanner(System.in);
	static int n = scanner.nextInt();
	static int a[][] = new int[2][n];

	@SuppressWarnings("resource")
	public static void main(String args[]) {

		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < n; j++) {
				a[i][j] = scanner.nextInt();
			}
		}

		dfs(0, 0, a[0][0]);

		int max = 0;
		for (int i = 0; i < scores.size(); i++) {
			max = Math.max(scores.get(i), max);
		}

		System.out.println(max);
	}

	static List<Integer> scores = new ArrayList<>();

	private static void dfs(int x, int y, int score) {
		if (x == n - 1 && y == 1) {
			scores.add(score);
			return;
		}

		try {
			score += a[y + 1][x];
			dfs(x, y + 1, score);
			score -= a[y + 1][x];
		} catch (Exception e) {

		}
		try {
			score += a[y][x + 1];
			dfs(x + 1, y, score);
		} catch (Exception e) {

		}

	}
} public class Main {
	static Scanner scanner = new Scanner(System.in);
	static int n = scanner.nextInt();
	static int a[][] = new int[2][n];

	@SuppressWarnings("resource")
	public static void main(String args[]) {

		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < n; j++) {
				a[i][j] = scanner.nextInt();
			}
		}

		dfs(0, 0, a[0][0]);

		int max = 0;
		for (int i = 0; i < scores.size(); i++) {
			max = Math.max(scores.get(i), max);
		}

		System.out.println(max);
	}

	static List<Integer> scores = new ArrayList<>();

	private static void dfs(int x, int y, int score) {
		if (x == n - 1 && y == 1) {
			scores.add(score);
			return;
		}

		try {
			score += a[y + 1][x];
			dfs(x, y + 1, score);
			score -= a[y + 1][x];
		} catch (Exception e) {

		}
		try {
			score += a[y][x + 1];
			dfs(x + 1, y, score);
		} catch (Exception e) {

		}

	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	static Scanner scanner = new Scanner(System.in);
	static int n = scanner.nextInt();
	static int a[][] = new int[2][n];

	@SuppressWarnings("resource")
	public static void main(String args[]) {

		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < n; j++) {
				a[i][j] = scanner.nextInt();
			}
		}

		dfs(0, 0, a[0][0]);

		int max = 0;
		for (int i = 0; i < scores.size(); i++) {
			max = Math.max(scores.get(i), max);
		}

		System.out.println(max);
	}

	static List<Integer> scores = new ArrayList<>();

	private static void dfs(int x, int y, int score) {
		if (x == n - 1 && y == 1) {
			scores.add(score);
			return;
		}

		try {
			score += a[y + 1][x];
			dfs(x, y + 1, score);
			score -= a[y + 1][x];
		} catch (Exception e) {

		}
		try {
			score += a[y][x + 1];
			dfs(x + 1, y, score);
		} catch (Exception e) {

		}

	}
}