
import java.util.*;
import java.util.stream.Collectors;
import java.io.*;
import java.nio.charset.StandardCharsets;

public class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	}

	int N;
	int[][] A;

	Main(BufferedReader in) throws IOException {
		N = Integer.parseInt(in.readLine());
		A = new int[2][N];
		for (int i = 0; i < 2; ++i) {
			String[] tokens = in.readLine().split(" ");
			for (int j = 0; j < N; ++j) {
				A[i][j] = Integer.parseInt(tokens[j]);
			}
		}
		int[][] memo = new int[2][N];
		memo[0][0] = A[0][0];
		for (int i = 1; i < N; ++i) {
			memo[0][i] = memo[0][i - 1] + A[0][i];
		}
		memo[1][0] = memo[0][0] + A[1][0];
		for (int i = 1; i < N; ++i) {
			memo[1][i] = Math.max(memo[0][i], memo[1][i - 1]) + A[1][i];
		}
		System.out.println(memo[1][N - 1]);

	}

	void calc() {
	}

	void showResult() {
	}
} import java.util.*; util.* java import java.util.stream.Collectors; Collectors java.util.stream import java.io.*; io.* java import java.nio.charset.StandardCharsets; StandardCharsets java.nio.charset public class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	}

	int N;
	int[][] A;

	Main(BufferedReader in) throws IOException {
		N = Integer.parseInt(in.readLine());
		A = new int[2][N];
		for (int i = 0; i < 2; ++i) {
			String[] tokens = in.readLine().split(" ");
			for (int j = 0; j < N; ++j) {
				A[i][j] = Integer.parseInt(tokens[j]);
			}
		}
		int[][] memo = new int[2][N];
		memo[0][0] = A[0][0];
		for (int i = 1; i < N; ++i) {
			memo[0][i] = memo[0][i - 1] + A[0][i];
		}
		memo[1][0] = memo[0][0] + A[1][0];
		for (int i = 1; i < N; ++i) {
			memo[1][i] = Math.max(memo[0][i], memo[1][i - 1]) + A[1][i];
		}
		System.out.println(memo[1][N - 1]);

	}

	void calc() {
	}

	void showResult() {
	}
} Main int N; N int[][] A; A public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	} main {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	} InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8); reader new InputStreamReader(System.in, StandardCharsets.UTF_8) BufferedReader in = new BufferedReader(reader); in new BufferedReader(reader) Main ins = new Main(in); ins new Main(in) ins.calc() ins.calc ins ins.showResult() ins.showResult ins String[] args args Main(BufferedReader in) throws IOException {
		N = Integer.parseInt(in.readLine());
		A = new int[2][N];
		for (int i = 0; i < 2; ++i) {
			String[] tokens = in.readLine().split(" ");
			for (int j = 0; j < N; ++j) {
				A[i][j] = Integer.parseInt(tokens[j]);
			}
		}
		int[][] memo = new int[2][N];
		memo[0][0] = A[0][0];
		for (int i = 1; i < N; ++i) {
			memo[0][i] = memo[0][i - 1] + A[0][i];
		}
		memo[1][0] = memo[0][0] + A[1][0];
		for (int i = 1; i < N; ++i) {
			memo[1][i] = Math.max(memo[0][i], memo[1][i - 1]) + A[1][i];
		}
		System.out.println(memo[1][N - 1]);

	} Main {
		N = Integer.parseInt(in.readLine());
		A = new int[2][N];
		for (int i = 0; i < 2; ++i) {
			String[] tokens = in.readLine().split(" ");
			for (int j = 0; j < N; ++j) {
				A[i][j] = Integer.parseInt(tokens[j]);
			}
		}
		int[][] memo = new int[2][N];
		memo[0][0] = A[0][0];
		for (int i = 1; i < N; ++i) {
			memo[0][i] = memo[0][i - 1] + A[0][i];
		}
		memo[1][0] = memo[0][0] + A[1][0];
		for (int i = 1; i < N; ++i) {
			memo[1][i] = Math.max(memo[0][i], memo[1][i - 1]) + A[1][i];
		}
		System.out.println(memo[1][N - 1]);

	} N = Integer.parseInt(in.readLine()) N Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in A = new int[2][N] A new int[2][N] 2 N for (int i = 0; i < 2; ++i) {
			String[] tokens = in.readLine().split(" ");
			for (int j = 0; j < N; ++j) {
				A[i][j] = Integer.parseInt(tokens[j]);
			}
		} int i = 0; int i = 0; i 0 i < 2 i 2 ++i ++i i {
			String[] tokens = in.readLine().split(" ");
			for (int j = 0; j < N; ++j) {
				A[i][j] = Integer.parseInt(tokens[j]);
			}
		} {
			String[] tokens = in.readLine().split(" ");
			for (int j = 0; j < N; ++j) {
				A[i][j] = Integer.parseInt(tokens[j]);
			}
		} String[] tokens = in.readLine().split(" "); tokens in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " for (int j = 0; j < N; ++j) {
				A[i][j] = Integer.parseInt(tokens[j]);
			} int j = 0; int j = 0; j 0 j < N j N ++j ++j j {
				A[i][j] = Integer.parseInt(tokens[j]);
			} {
				A[i][j] = Integer.parseInt(tokens[j]);
			} A[i][j] = Integer.parseInt(tokens[j]) A[i][j] A[i] A i j Integer.parseInt(tokens[j]) Integer.parseInt Integer tokens[j] tokens j int[][] memo = new int[2][N]; memo new int[2][N] 2 N memo[0][0] = A[0][0] memo[0][0] memo[0] memo 0 0 A[0][0] A[0] A 0 0 for (int i = 1; i < N; ++i) {
			memo[0][i] = memo[0][i - 1] + A[0][i];
		} int i = 1; int i = 1; i 1 i < N i N ++i ++i i {
			memo[0][i] = memo[0][i - 1] + A[0][i];
		} {
			memo[0][i] = memo[0][i - 1] + A[0][i];
		} memo[0][i] = memo[0][i - 1] + A[0][i] memo[0][i] memo[0] memo 0 i memo[0][i - 1] + A[0][i] memo[0][i - 1] memo[0] memo 0 i - 1 i 1 A[0][i] A[0] A 0 i memo[1][0] = memo[0][0] + A[1][0] memo[1][0] memo[1] memo 1 0 memo[0][0] + A[1][0] memo[0][0] memo[0] memo 0 0 A[1][0] A[1] A 1 0 for (int i = 1; i < N; ++i) {
			memo[1][i] = Math.max(memo[0][i], memo[1][i - 1]) + A[1][i];
		} int i = 1; int i = 1; i 1 i < N i N ++i ++i i {
			memo[1][i] = Math.max(memo[0][i], memo[1][i - 1]) + A[1][i];
		} {
			memo[1][i] = Math.max(memo[0][i], memo[1][i - 1]) + A[1][i];
		} memo[1][i] = Math.max(memo[0][i], memo[1][i - 1]) + A[1][i] memo[1][i] memo[1] memo 1 i Math.max(memo[0][i], memo[1][i - 1]) + A[1][i] Math.max(memo[0][i], memo[1][i - 1]) Math.max Math memo[0][i] memo[0] memo 0 i memo[1][i - 1] memo[1] memo 1 i - 1 i 1 A[1][i] A[1] A 1 i System.out.println(memo[1][N - 1]) System.out.println System.out System System.out memo[1][N - 1] memo[1] memo 1 N - 1 N 1 BufferedReader in in void calc() {
	} calc {
	} void showResult() {
	} showResult {
	} public class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	}

	int N;
	int[][] A;

	Main(BufferedReader in) throws IOException {
		N = Integer.parseInt(in.readLine());
		A = new int[2][N];
		for (int i = 0; i < 2; ++i) {
			String[] tokens = in.readLine().split(" ");
			for (int j = 0; j < N; ++j) {
				A[i][j] = Integer.parseInt(tokens[j]);
			}
		}
		int[][] memo = new int[2][N];
		memo[0][0] = A[0][0];
		for (int i = 1; i < N; ++i) {
			memo[0][i] = memo[0][i - 1] + A[0][i];
		}
		memo[1][0] = memo[0][0] + A[1][0];
		for (int i = 1; i < N; ++i) {
			memo[1][i] = Math.max(memo[0][i], memo[1][i - 1]) + A[1][i];
		}
		System.out.println(memo[1][N - 1]);

	}

	void calc() {
	}

	void showResult() {
	}
} public class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	}

	int N;
	int[][] A;

	Main(BufferedReader in) throws IOException {
		N = Integer.parseInt(in.readLine());
		A = new int[2][N];
		for (int i = 0; i < 2; ++i) {
			String[] tokens = in.readLine().split(" ");
			for (int j = 0; j < N; ++j) {
				A[i][j] = Integer.parseInt(tokens[j]);
			}
		}
		int[][] memo = new int[2][N];
		memo[0][0] = A[0][0];
		for (int i = 1; i < N; ++i) {
			memo[0][i] = memo[0][i - 1] + A[0][i];
		}
		memo[1][0] = memo[0][0] + A[1][0];
		for (int i = 1; i < N; ++i) {
			memo[1][i] = Math.max(memo[0][i], memo[1][i - 1]) + A[1][i];
		}
		System.out.println(memo[1][N - 1]);

	}

	void calc() {
	}

	void showResult() {
	}
} Main

import java.util.*;
import java.util.stream.Collectors;
import java.io.*;
import java.nio.charset.StandardCharsets;

public class Main {
	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		Main ins = new Main(in);
		ins.calc();
		ins.showResult();
	}

	int N;
	int[][] A;

	Main(BufferedReader in) throws IOException {
		N = Integer.parseInt(in.readLine());
		A = new int[2][N];
		for (int i = 0; i < 2; ++i) {
			String[] tokens = in.readLine().split(" ");
			for (int j = 0; j < N; ++j) {
				A[i][j] = Integer.parseInt(tokens[j]);
			}
		}
		int[][] memo = new int[2][N];
		memo[0][0] = A[0][0];
		for (int i = 1; i < N; ++i) {
			memo[0][i] = memo[0][i - 1] + A[0][i];
		}
		memo[1][0] = memo[0][0] + A[1][0];
		for (int i = 1; i < N; ++i) {
			memo[1][i] = Math.max(memo[0][i], memo[1][i - 1]) + A[1][i];
		}
		System.out.println(memo[1][N - 1]);

	}

	void calc() {
	}

	void showResult() {
	}
}