import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner stdin = new Scanner(System.in);

		int inN = stdin.nextInt();

		int[] inA0 = new int[inN];
		inA0[0] = stdin.nextInt();
		for (int i = 1; i < inN; i++) {
			inA0[i] = inA0[i - 1] + stdin.nextInt();
		}

		int[] inA1 = new int[inN];
		for (int i = 0; i < inN; i++) {
			inA1[i] = stdin.nextInt();
		}

		int max = inA0[inN - 1] + inA1[inN - 1];
		for (int i = (inN - 2); i >= 0; i--) {
			inA1[i] += inA1[i + 1];
			max = Math.max(max, (inA0[i] + inA1[i]));
		}

		System.out.println(max);
	}

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

	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner stdin = new Scanner(System.in);

		int inN = stdin.nextInt();

		int[] inA0 = new int[inN];
		inA0[0] = stdin.nextInt();
		for (int i = 1; i < inN; i++) {
			inA0[i] = inA0[i - 1] + stdin.nextInt();
		}

		int[] inA1 = new int[inN];
		for (int i = 0; i < inN; i++) {
			inA1[i] = stdin.nextInt();
		}

		int max = inA0[inN - 1] + inA1[inN - 1];
		for (int i = (inN - 2); i >= 0; i--) {
			inA1[i] += inA1[i + 1];
			max = Math.max(max, (inA0[i] + inA1[i]));
		}

		System.out.println(max);
	}

} Main public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner stdin = new Scanner(System.in);

		int inN = stdin.nextInt();

		int[] inA0 = new int[inN];
		inA0[0] = stdin.nextInt();
		for (int i = 1; i < inN; i++) {
			inA0[i] = inA0[i - 1] + stdin.nextInt();
		}

		int[] inA1 = new int[inN];
		for (int i = 0; i < inN; i++) {
			inA1[i] = stdin.nextInt();
		}

		int max = inA0[inN - 1] + inA1[inN - 1];
		for (int i = (inN - 2); i >= 0; i--) {
			inA1[i] += inA1[i + 1];
			max = Math.max(max, (inA0[i] + inA1[i]));
		}

		System.out.println(max);
	} main {
		@SuppressWarnings("resource")
		Scanner stdin = new Scanner(System.in);

		int inN = stdin.nextInt();

		int[] inA0 = new int[inN];
		inA0[0] = stdin.nextInt();
		for (int i = 1; i < inN; i++) {
			inA0[i] = inA0[i - 1] + stdin.nextInt();
		}

		int[] inA1 = new int[inN];
		for (int i = 0; i < inN; i++) {
			inA1[i] = stdin.nextInt();
		}

		int max = inA0[inN - 1] + inA1[inN - 1];
		for (int i = (inN - 2); i >= 0; i--) {
			inA1[i] += inA1[i + 1];
			max = Math.max(max, (inA0[i] + inA1[i]));
		}

		System.out.println(max);
	} @SuppressWarnings("resource")
		Scanner stdin = new Scanner(System.in); stdin new Scanner(System.in) int inN = stdin.nextInt(); inN stdin.nextInt() stdin.nextInt stdin int[] inA0 = new int[inN]; inA0 new int[inN] inN inA0[0] = stdin.nextInt() inA0[0] inA0 0 stdin.nextInt() stdin.nextInt stdin for (int i = 1; i < inN; i++) {
			inA0[i] = inA0[i - 1] + stdin.nextInt();
		} int i = 1; int i = 1; i 1 i < inN i inN i++ i++ i {
			inA0[i] = inA0[i - 1] + stdin.nextInt();
		} {
			inA0[i] = inA0[i - 1] + stdin.nextInt();
		} inA0[i] = inA0[i - 1] + stdin.nextInt() inA0[i] inA0 i inA0[i - 1] + stdin.nextInt() inA0[i - 1] inA0 i - 1 i 1 stdin.nextInt() stdin.nextInt stdin int[] inA1 = new int[inN]; inA1 new int[inN] inN for (int i = 0; i < inN; i++) {
			inA1[i] = stdin.nextInt();
		} int i = 0; int i = 0; i 0 i < inN i inN i++ i++ i {
			inA1[i] = stdin.nextInt();
		} {
			inA1[i] = stdin.nextInt();
		} inA1[i] = stdin.nextInt() inA1[i] inA1 i stdin.nextInt() stdin.nextInt stdin int max = inA0[inN - 1] + inA1[inN - 1]; max inA0[inN - 1] + inA1[inN - 1] inA0[inN - 1] inA0 inN - 1 inN 1 inA1[inN - 1] inA1 inN - 1 inN 1 for (int i = (inN - 2); i >= 0; i--) {
			inA1[i] += inA1[i + 1];
			max = Math.max(max, (inA0[i] + inA1[i]));
		} int i = (inN - 2); int i = (inN - 2); i (inN - 2) inN 2 i >= 0 i 0 i-- i-- i {
			inA1[i] += inA1[i + 1];
			max = Math.max(max, (inA0[i] + inA1[i]));
		} {
			inA1[i] += inA1[i + 1];
			max = Math.max(max, (inA0[i] + inA1[i]));
		} inA1[i] += inA1[i + 1] inA1[i] inA1 i inA1[i + 1] inA1 i + 1 i 1 max = Math.max(max, (inA0[i] + inA1[i])) max Math.max(max, (inA0[i] + inA1[i])) Math.max Math max (inA0[i] + inA1[i]) inA0[i] inA0 i inA1[i] inA1 i System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {

	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner stdin = new Scanner(System.in);

		int inN = stdin.nextInt();

		int[] inA0 = new int[inN];
		inA0[0] = stdin.nextInt();
		for (int i = 1; i < inN; i++) {
			inA0[i] = inA0[i - 1] + stdin.nextInt();
		}

		int[] inA1 = new int[inN];
		for (int i = 0; i < inN; i++) {
			inA1[i] = stdin.nextInt();
		}

		int max = inA0[inN - 1] + inA1[inN - 1];
		for (int i = (inN - 2); i >= 0; i--) {
			inA1[i] += inA1[i + 1];
			max = Math.max(max, (inA0[i] + inA1[i]));
		}

		System.out.println(max);
	}

} public class Main {

	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner stdin = new Scanner(System.in);

		int inN = stdin.nextInt();

		int[] inA0 = new int[inN];
		inA0[0] = stdin.nextInt();
		for (int i = 1; i < inN; i++) {
			inA0[i] = inA0[i - 1] + stdin.nextInt();
		}

		int[] inA1 = new int[inN];
		for (int i = 0; i < inN; i++) {
			inA1[i] = stdin.nextInt();
		}

		int max = inA0[inN - 1] + inA1[inN - 1];
		for (int i = (inN - 2); i >= 0; i--) {
			inA1[i] += inA1[i + 1];
			max = Math.max(max, (inA0[i] + inA1[i]));
		}

		System.out.println(max);
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner stdin = new Scanner(System.in);

		int inN = stdin.nextInt();

		int[] inA0 = new int[inN];
		inA0[0] = stdin.nextInt();
		for (int i = 1; i < inN; i++) {
			inA0[i] = inA0[i - 1] + stdin.nextInt();
		}

		int[] inA1 = new int[inN];
		for (int i = 0; i < inN; i++) {
			inA1[i] = stdin.nextInt();
		}

		int max = inA0[inN - 1] + inA1[inN - 1];
		for (int i = (inN - 2); i >= 0; i--) {
			inA1[i] += inA1[i + 1];
			max = Math.max(max, (inA0[i] + inA1[i]));
		}

		System.out.println(max);
	}

}
