import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/*
 * AtCoder Beginner Contest 087 C "Candies"
 *   https://abc087.contest.atcoder.jp/tasks/arc090_a/
 */
public class Main {

	public static void main(String[] args) {

		InputScanner in = new InputScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int N = in.nextInt();
		int[][] A = in.nextIntArray(2, N);

		int sum1 = A[0][0];
		int sum2 = 0;
		for (int i = 0; i < N; i++) {
			sum2 += A[1][i];
		}

		int ans = sum1 + sum2;
		for (int i = 1; i < N; i++) {
			sum1 += A[0][i];
			sum2 -= A[1][i - 1];
			ans = Math.max(ans, sum1 + sum2);
		}

		out.println(ans);

		in.close();
		out.close();
	}

	/*
	 * extends java.util.Scanner
	 */
	static class InputScanner {

		Scanner scanner;

		public InputScanner(InputStream inputStream) {
			this.scanner = new Scanner(inputStream);
		}

		public int nextInt() {
			return scanner.nextInt();
		}

		public long nextLong() {
			return scanner.nextLong();
		}

		public double nextDouble() {
			return scanner.nextDouble();
		}
		public String next() {
			return scanner.next();
		}

		public int[] nextIntArray(int n) {
			int[] ret = new int[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextInt();
			}
			return ret;
		}

		public int[][] nextIntArray(int h, int w) {
			int[][] ret = new int[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextInt();
				}
			}
			return ret;
		}

		public long[] nextLongArray(int n) {
			long[] ret = new long[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextLong();
			}
			return ret;
		}

		public long[][] nextlongArray(int h, int w) {
			long[][] ret = new long[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextLong();
				}
			}
			return ret;
		}

		public double[] nextDoubleArray(int n) {
			double[] ret = new double[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextDouble();
			}
			return ret;
		}

		public double[][] nextDoubleArray(int h, int w) {
			double[][] ret = new double[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextLong();
				}
			}
			return ret;
		}

		public String[] nextStringArray(int n) {
			String[] ret = new String[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.next();
			}
			return ret;
		}

		public String[] nextStringArray(int n, String split) {
			String[] ret = scanner.next().split(split);
			return ret;
		}

		public String[][] nextStringArray(int h, int w) {
			String[][] ret = new String[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.next();
				}
			}
			return ret;
		}

		public String[][] nextStringArray(int h, int w, String split) {
			String[][] ret = new String[h][w];
			for (int i = 0; i < h; i++) {
				ret[i] = scanner.next().split(split);
			}
			return ret;
		}

		public void close() {
			scanner.close();
		}

	}

} import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		InputScanner in = new InputScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int N = in.nextInt();
		int[][] A = in.nextIntArray(2, N);

		int sum1 = A[0][0];
		int sum2 = 0;
		for (int i = 0; i < N; i++) {
			sum2 += A[1][i];
		}

		int ans = sum1 + sum2;
		for (int i = 1; i < N; i++) {
			sum1 += A[0][i];
			sum2 -= A[1][i - 1];
			ans = Math.max(ans, sum1 + sum2);
		}

		out.println(ans);

		in.close();
		out.close();
	}

	/*
	 * extends java.util.Scanner
	 */
	static class InputScanner {

		Scanner scanner;

		public InputScanner(InputStream inputStream) {
			this.scanner = new Scanner(inputStream);
		}

		public int nextInt() {
			return scanner.nextInt();
		}

		public long nextLong() {
			return scanner.nextLong();
		}

		public double nextDouble() {
			return scanner.nextDouble();
		}
		public String next() {
			return scanner.next();
		}

		public int[] nextIntArray(int n) {
			int[] ret = new int[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextInt();
			}
			return ret;
		}

		public int[][] nextIntArray(int h, int w) {
			int[][] ret = new int[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextInt();
				}
			}
			return ret;
		}

		public long[] nextLongArray(int n) {
			long[] ret = new long[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextLong();
			}
			return ret;
		}

		public long[][] nextlongArray(int h, int w) {
			long[][] ret = new long[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextLong();
				}
			}
			return ret;
		}

		public double[] nextDoubleArray(int n) {
			double[] ret = new double[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextDouble();
			}
			return ret;
		}

		public double[][] nextDoubleArray(int h, int w) {
			double[][] ret = new double[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextLong();
				}
			}
			return ret;
		}

		public String[] nextStringArray(int n) {
			String[] ret = new String[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.next();
			}
			return ret;
		}

		public String[] nextStringArray(int n, String split) {
			String[] ret = scanner.next().split(split);
			return ret;
		}

		public String[][] nextStringArray(int h, int w) {
			String[][] ret = new String[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.next();
				}
			}
			return ret;
		}

		public String[][] nextStringArray(int h, int w, String split) {
			String[][] ret = new String[h][w];
			for (int i = 0; i < h; i++) {
				ret[i] = scanner.next().split(split);
			}
			return ret;
		}

		public void close() {
			scanner.close();
		}

	}

} Main public static void main(String[] args) {

		InputScanner in = new InputScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int N = in.nextInt();
		int[][] A = in.nextIntArray(2, N);

		int sum1 = A[0][0];
		int sum2 = 0;
		for (int i = 0; i < N; i++) {
			sum2 += A[1][i];
		}

		int ans = sum1 + sum2;
		for (int i = 1; i < N; i++) {
			sum1 += A[0][i];
			sum2 -= A[1][i - 1];
			ans = Math.max(ans, sum1 + sum2);
		}

		out.println(ans);

		in.close();
		out.close();
	} main {

		InputScanner in = new InputScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int N = in.nextInt();
		int[][] A = in.nextIntArray(2, N);

		int sum1 = A[0][0];
		int sum2 = 0;
		for (int i = 0; i < N; i++) {
			sum2 += A[1][i];
		}

		int ans = sum1 + sum2;
		for (int i = 1; i < N; i++) {
			sum1 += A[0][i];
			sum2 -= A[1][i - 1];
			ans = Math.max(ans, sum1 + sum2);
		}

		out.println(ans);

		in.close();
		out.close();
	} InputScanner in = new InputScanner(System.in); in new InputScanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) int N = in.nextInt(); N in.nextInt() in.nextInt in int[][] A = in.nextIntArray(2, N); A in.nextIntArray(2, N) in.nextIntArray in 2 N int sum1 = A[0][0]; sum1 A[0][0] A[0] A 0 0 int sum2 = 0; sum2 0 for (int i = 0; i < N; i++) {
			sum2 += A[1][i];
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			sum2 += A[1][i];
		} {
			sum2 += A[1][i];
		} sum2 += A[1][i] sum2 A[1][i] A[1] A 1 i int ans = sum1 + sum2; ans sum1 + sum2 sum1 sum2 for (int i = 1; i < N; i++) {
			sum1 += A[0][i];
			sum2 -= A[1][i - 1];
			ans = Math.max(ans, sum1 + sum2);
		} int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
			sum1 += A[0][i];
			sum2 -= A[1][i - 1];
			ans = Math.max(ans, sum1 + sum2);
		} {
			sum1 += A[0][i];
			sum2 -= A[1][i - 1];
			ans = Math.max(ans, sum1 + sum2);
		} sum1 += A[0][i] sum1 A[0][i] A[0] A 0 i sum2 -= A[1][i - 1] sum2 A[1][i - 1] A[1] A 1 i - 1 i 1 ans = Math.max(ans, sum1 + sum2) ans Math.max(ans, sum1 + sum2) Math.max Math ans sum1 + sum2 sum1 sum2 out.println(ans) out.println out ans in.close() in.close in out.close() out.close out String[] args args static class InputScanner {

		Scanner scanner;

		public InputScanner(InputStream inputStream) {
			this.scanner = new Scanner(inputStream);
		}

		public int nextInt() {
			return scanner.nextInt();
		}

		public long nextLong() {
			return scanner.nextLong();
		}

		public double nextDouble() {
			return scanner.nextDouble();
		}
		public String next() {
			return scanner.next();
		}

		public int[] nextIntArray(int n) {
			int[] ret = new int[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextInt();
			}
			return ret;
		}

		public int[][] nextIntArray(int h, int w) {
			int[][] ret = new int[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextInt();
				}
			}
			return ret;
		}

		public long[] nextLongArray(int n) {
			long[] ret = new long[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextLong();
			}
			return ret;
		}

		public long[][] nextlongArray(int h, int w) {
			long[][] ret = new long[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextLong();
				}
			}
			return ret;
		}

		public double[] nextDoubleArray(int n) {
			double[] ret = new double[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextDouble();
			}
			return ret;
		}

		public double[][] nextDoubleArray(int h, int w) {
			double[][] ret = new double[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextLong();
				}
			}
			return ret;
		}

		public String[] nextStringArray(int n) {
			String[] ret = new String[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.next();
			}
			return ret;
		}

		public String[] nextStringArray(int n, String split) {
			String[] ret = scanner.next().split(split);
			return ret;
		}

		public String[][] nextStringArray(int h, int w) {
			String[][] ret = new String[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.next();
				}
			}
			return ret;
		}

		public String[][] nextStringArray(int h, int w, String split) {
			String[][] ret = new String[h][w];
			for (int i = 0; i < h; i++) {
				ret[i] = scanner.next().split(split);
			}
			return ret;
		}

		public void close() {
			scanner.close();
		}

	} InputScanner Scanner scanner; scanner public InputScanner(InputStream inputStream) {
			this.scanner = new Scanner(inputStream);
		} InputScanner {
			this.scanner = new Scanner(inputStream);
		} this.scanner = new Scanner(inputStream) this.scanner this this.scanner new Scanner(inputStream) InputStream inputStream inputStream public int nextInt() {
			return scanner.nextInt();
		} nextInt {
			return scanner.nextInt();
		} return scanner.nextInt(); scanner.nextInt() scanner.nextInt scanner public long nextLong() {
			return scanner.nextLong();
		} nextLong {
			return scanner.nextLong();
		} return scanner.nextLong(); scanner.nextLong() scanner.nextLong scanner public double nextDouble() {
			return scanner.nextDouble();
		} nextDouble {
			return scanner.nextDouble();
		} return scanner.nextDouble(); scanner.nextDouble() scanner.nextDouble scanner public String next() {
			return scanner.next();
		} next {
			return scanner.next();
		} return scanner.next(); scanner.next() scanner.next scanner public int[] nextIntArray(int n) {
			int[] ret = new int[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextInt();
			}
			return ret;
		} nextIntArray {
			int[] ret = new int[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextInt();
			}
			return ret;
		} int[] ret = new int[n]; ret new int[n] n for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextInt();
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				ret[i] = scanner.nextInt();
			} {
				ret[i] = scanner.nextInt();
			} ret[i] = scanner.nextInt() ret[i] ret i scanner.nextInt() scanner.nextInt scanner return ret; ret int n n public int[][] nextIntArray(int h, int w) {
			int[][] ret = new int[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextInt();
				}
			}
			return ret;
		} nextIntArray {
			int[][] ret = new int[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextInt();
				}
			}
			return ret;
		} int[][] ret = new int[h][w]; ret new int[h][w] h w for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextInt();
				}
			} int i = 0; int i = 0; i 0 i < h i h i++ i++ i {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextInt();
				}
			} {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextInt();
				}
			} for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextInt();
				} int j = 0; int j = 0; j 0 j < w j w j++ j++ j {
					ret[i][j] = scanner.nextInt();
				} {
					ret[i][j] = scanner.nextInt();
				} ret[i][j] = scanner.nextInt() ret[i][j] ret[i] ret i j scanner.nextInt() scanner.nextInt scanner return ret; ret int h h int w w public long[] nextLongArray(int n) {
			long[] ret = new long[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextLong();
			}
			return ret;
		} nextLongArray {
			long[] ret = new long[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextLong();
			}
			return ret;
		} long[] ret = new long[n]; ret new long[n] n for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextLong();
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				ret[i] = scanner.nextLong();
			} {
				ret[i] = scanner.nextLong();
			} ret[i] = scanner.nextLong() ret[i] ret i scanner.nextLong() scanner.nextLong scanner return ret; ret int n n public long[][] nextlongArray(int h, int w) {
			long[][] ret = new long[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextLong();
				}
			}
			return ret;
		} nextlongArray {
			long[][] ret = new long[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextLong();
				}
			}
			return ret;
		} long[][] ret = new long[h][w]; ret new long[h][w] h w for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextLong();
				}
			} int i = 0; int i = 0; i 0 i < h i h i++ i++ i {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextLong();
				}
			} {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextLong();
				}
			} for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextLong();
				} int j = 0; int j = 0; j 0 j < w j w j++ j++ j {
					ret[i][j] = scanner.nextLong();
				} {
					ret[i][j] = scanner.nextLong();
				} ret[i][j] = scanner.nextLong() ret[i][j] ret[i] ret i j scanner.nextLong() scanner.nextLong scanner return ret; ret int h h int w w public double[] nextDoubleArray(int n) {
			double[] ret = new double[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextDouble();
			}
			return ret;
		} nextDoubleArray {
			double[] ret = new double[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextDouble();
			}
			return ret;
		} double[] ret = new double[n]; ret new double[n] n for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextDouble();
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				ret[i] = scanner.nextDouble();
			} {
				ret[i] = scanner.nextDouble();
			} ret[i] = scanner.nextDouble() ret[i] ret i scanner.nextDouble() scanner.nextDouble scanner return ret; ret int n n public double[][] nextDoubleArray(int h, int w) {
			double[][] ret = new double[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextLong();
				}
			}
			return ret;
		} nextDoubleArray {
			double[][] ret = new double[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextLong();
				}
			}
			return ret;
		} double[][] ret = new double[h][w]; ret new double[h][w] h w for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextLong();
				}
			} int i = 0; int i = 0; i 0 i < h i h i++ i++ i {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextLong();
				}
			} {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextLong();
				}
			} for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextLong();
				} int j = 0; int j = 0; j 0 j < w j w j++ j++ j {
					ret[i][j] = scanner.nextLong();
				} {
					ret[i][j] = scanner.nextLong();
				} ret[i][j] = scanner.nextLong() ret[i][j] ret[i] ret i j scanner.nextLong() scanner.nextLong scanner return ret; ret int h h int w w public String[] nextStringArray(int n) {
			String[] ret = new String[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.next();
			}
			return ret;
		} nextStringArray {
			String[] ret = new String[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.next();
			}
			return ret;
		} String[] ret = new String[n]; ret new String[n] n for (int i = 0; i < n; i++) {
				ret[i] = scanner.next();
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				ret[i] = scanner.next();
			} {
				ret[i] = scanner.next();
			} ret[i] = scanner.next() ret[i] ret i scanner.next() scanner.next scanner return ret; ret int n n public String[] nextStringArray(int n, String split) {
			String[] ret = scanner.next().split(split);
			return ret;
		} nextStringArray {
			String[] ret = scanner.next().split(split);
			return ret;
		} String[] ret = scanner.next().split(split); ret scanner.next().split(split) scanner.next().split scanner.next() scanner.next scanner split return ret; ret int n n String split split public String[][] nextStringArray(int h, int w) {
			String[][] ret = new String[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.next();
				}
			}
			return ret;
		} nextStringArray {
			String[][] ret = new String[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.next();
				}
			}
			return ret;
		} String[][] ret = new String[h][w]; ret new String[h][w] h w for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.next();
				}
			} int i = 0; int i = 0; i 0 i < h i h i++ i++ i {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.next();
				}
			} {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.next();
				}
			} for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.next();
				} int j = 0; int j = 0; j 0 j < w j w j++ j++ j {
					ret[i][j] = scanner.next();
				} {
					ret[i][j] = scanner.next();
				} ret[i][j] = scanner.next() ret[i][j] ret[i] ret i j scanner.next() scanner.next scanner return ret; ret int h h int w w public String[][] nextStringArray(int h, int w, String split) {
			String[][] ret = new String[h][w];
			for (int i = 0; i < h; i++) {
				ret[i] = scanner.next().split(split);
			}
			return ret;
		} nextStringArray {
			String[][] ret = new String[h][w];
			for (int i = 0; i < h; i++) {
				ret[i] = scanner.next().split(split);
			}
			return ret;
		} String[][] ret = new String[h][w]; ret new String[h][w] h w for (int i = 0; i < h; i++) {
				ret[i] = scanner.next().split(split);
			} int i = 0; int i = 0; i 0 i < h i h i++ i++ i {
				ret[i] = scanner.next().split(split);
			} {
				ret[i] = scanner.next().split(split);
			} ret[i] = scanner.next().split(split) ret[i] ret i scanner.next().split(split) scanner.next().split scanner.next() scanner.next scanner split return ret; ret int h h int w w String split split public void close() {
			scanner.close();
		} close {
			scanner.close();
		} scanner.close() scanner.close scanner public class Main {

	public static void main(String[] args) {

		InputScanner in = new InputScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int N = in.nextInt();
		int[][] A = in.nextIntArray(2, N);

		int sum1 = A[0][0];
		int sum2 = 0;
		for (int i = 0; i < N; i++) {
			sum2 += A[1][i];
		}

		int ans = sum1 + sum2;
		for (int i = 1; i < N; i++) {
			sum1 += A[0][i];
			sum2 -= A[1][i - 1];
			ans = Math.max(ans, sum1 + sum2);
		}

		out.println(ans);

		in.close();
		out.close();
	}

	/*
	 * extends java.util.Scanner
	 */
	static class InputScanner {

		Scanner scanner;

		public InputScanner(InputStream inputStream) {
			this.scanner = new Scanner(inputStream);
		}

		public int nextInt() {
			return scanner.nextInt();
		}

		public long nextLong() {
			return scanner.nextLong();
		}

		public double nextDouble() {
			return scanner.nextDouble();
		}
		public String next() {
			return scanner.next();
		}

		public int[] nextIntArray(int n) {
			int[] ret = new int[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextInt();
			}
			return ret;
		}

		public int[][] nextIntArray(int h, int w) {
			int[][] ret = new int[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextInt();
				}
			}
			return ret;
		}

		public long[] nextLongArray(int n) {
			long[] ret = new long[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextLong();
			}
			return ret;
		}

		public long[][] nextlongArray(int h, int w) {
			long[][] ret = new long[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextLong();
				}
			}
			return ret;
		}

		public double[] nextDoubleArray(int n) {
			double[] ret = new double[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextDouble();
			}
			return ret;
		}

		public double[][] nextDoubleArray(int h, int w) {
			double[][] ret = new double[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextLong();
				}
			}
			return ret;
		}

		public String[] nextStringArray(int n) {
			String[] ret = new String[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.next();
			}
			return ret;
		}

		public String[] nextStringArray(int n, String split) {
			String[] ret = scanner.next().split(split);
			return ret;
		}

		public String[][] nextStringArray(int h, int w) {
			String[][] ret = new String[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.next();
				}
			}
			return ret;
		}

		public String[][] nextStringArray(int h, int w, String split) {
			String[][] ret = new String[h][w];
			for (int i = 0; i < h; i++) {
				ret[i] = scanner.next().split(split);
			}
			return ret;
		}

		public void close() {
			scanner.close();
		}

	}

} public class Main {

	public static void main(String[] args) {

		InputScanner in = new InputScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int N = in.nextInt();
		int[][] A = in.nextIntArray(2, N);

		int sum1 = A[0][0];
		int sum2 = 0;
		for (int i = 0; i < N; i++) {
			sum2 += A[1][i];
		}

		int ans = sum1 + sum2;
		for (int i = 1; i < N; i++) {
			sum1 += A[0][i];
			sum2 -= A[1][i - 1];
			ans = Math.max(ans, sum1 + sum2);
		}

		out.println(ans);

		in.close();
		out.close();
	}

	/*
	 * extends java.util.Scanner
	 */
	static class InputScanner {

		Scanner scanner;

		public InputScanner(InputStream inputStream) {
			this.scanner = new Scanner(inputStream);
		}

		public int nextInt() {
			return scanner.nextInt();
		}

		public long nextLong() {
			return scanner.nextLong();
		}

		public double nextDouble() {
			return scanner.nextDouble();
		}
		public String next() {
			return scanner.next();
		}

		public int[] nextIntArray(int n) {
			int[] ret = new int[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextInt();
			}
			return ret;
		}

		public int[][] nextIntArray(int h, int w) {
			int[][] ret = new int[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextInt();
				}
			}
			return ret;
		}

		public long[] nextLongArray(int n) {
			long[] ret = new long[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextLong();
			}
			return ret;
		}

		public long[][] nextlongArray(int h, int w) {
			long[][] ret = new long[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextLong();
				}
			}
			return ret;
		}

		public double[] nextDoubleArray(int n) {
			double[] ret = new double[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextDouble();
			}
			return ret;
		}

		public double[][] nextDoubleArray(int h, int w) {
			double[][] ret = new double[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextLong();
				}
			}
			return ret;
		}

		public String[] nextStringArray(int n) {
			String[] ret = new String[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.next();
			}
			return ret;
		}

		public String[] nextStringArray(int n, String split) {
			String[] ret = scanner.next().split(split);
			return ret;
		}

		public String[][] nextStringArray(int h, int w) {
			String[][] ret = new String[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.next();
				}
			}
			return ret;
		}

		public String[][] nextStringArray(int h, int w, String split) {
			String[][] ret = new String[h][w];
			for (int i = 0; i < h; i++) {
				ret[i] = scanner.next().split(split);
			}
			return ret;
		}

		public void close() {
			scanner.close();
		}

	}

} Main
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/*
 * AtCoder Beginner Contest 087 C "Candies"
 *   https://abc087.contest.atcoder.jp/tasks/arc090_a/
 */
public class Main {

	public static void main(String[] args) {

		InputScanner in = new InputScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int N = in.nextInt();
		int[][] A = in.nextIntArray(2, N);

		int sum1 = A[0][0];
		int sum2 = 0;
		for (int i = 0; i < N; i++) {
			sum2 += A[1][i];
		}

		int ans = sum1 + sum2;
		for (int i = 1; i < N; i++) {
			sum1 += A[0][i];
			sum2 -= A[1][i - 1];
			ans = Math.max(ans, sum1 + sum2);
		}

		out.println(ans);

		in.close();
		out.close();
	}

	/*
	 * extends java.util.Scanner
	 */
	static class InputScanner {

		Scanner scanner;

		public InputScanner(InputStream inputStream) {
			this.scanner = new Scanner(inputStream);
		}

		public int nextInt() {
			return scanner.nextInt();
		}

		public long nextLong() {
			return scanner.nextLong();
		}

		public double nextDouble() {
			return scanner.nextDouble();
		}
		public String next() {
			return scanner.next();
		}

		public int[] nextIntArray(int n) {
			int[] ret = new int[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextInt();
			}
			return ret;
		}

		public int[][] nextIntArray(int h, int w) {
			int[][] ret = new int[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextInt();
				}
			}
			return ret;
		}

		public long[] nextLongArray(int n) {
			long[] ret = new long[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextLong();
			}
			return ret;
		}

		public long[][] nextlongArray(int h, int w) {
			long[][] ret = new long[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextLong();
				}
			}
			return ret;
		}

		public double[] nextDoubleArray(int n) {
			double[] ret = new double[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.nextDouble();
			}
			return ret;
		}

		public double[][] nextDoubleArray(int h, int w) {
			double[][] ret = new double[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.nextLong();
				}
			}
			return ret;
		}

		public String[] nextStringArray(int n) {
			String[] ret = new String[n];
			for (int i = 0; i < n; i++) {
				ret[i] = scanner.next();
			}
			return ret;
		}

		public String[] nextStringArray(int n, String split) {
			String[] ret = scanner.next().split(split);
			return ret;
		}

		public String[][] nextStringArray(int h, int w) {
			String[][] ret = new String[h][w];
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					ret[i][j] = scanner.next();
				}
			}
			return ret;
		}

		public String[][] nextStringArray(int h, int w, String split) {
			String[][] ret = new String[h][w];
			for (int i = 0; i < h; i++) {
				ret[i] = scanner.next().split(split);
			}
			return ret;
		}

		public void close() {
			scanner.close();
		}

	}

}
