import java.util.Scanner;



public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		int[] Aline = new int[N];
		int[] Bline = new int[N];

		Aline[0] = sc.nextInt();
		for (int i = 1; i < N; i++) {
			Aline[i] += sc.nextInt() + Aline[i-1];
		}


		Bline[0] = sc.nextInt();
		for (int i = 1; i < N; i++) {
			Bline[i] += sc.nextInt() + Bline[i-1];
		}
		int max = 0;
		int amount = 0;
		for (int i = 0; i < N; i++) {
			if (i == 0) {
				amount = Aline[i] + Bline[N-1];
			}else {
				amount = Aline[i] + Bline[N-1] - Bline[i-1];
			}

			max = Math.max(max, amount);

		}
		System.out.println(max);

	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		int[] Aline = new int[N];
		int[] Bline = new int[N];

		Aline[0] = sc.nextInt();
		for (int i = 1; i < N; i++) {
			Aline[i] += sc.nextInt() + Aline[i-1];
		}


		Bline[0] = sc.nextInt();
		for (int i = 1; i < N; i++) {
			Bline[i] += sc.nextInt() + Bline[i-1];
		}
		int max = 0;
		int amount = 0;
		for (int i = 0; i < N; i++) {
			if (i == 0) {
				amount = Aline[i] + Bline[N-1];
			}else {
				amount = Aline[i] + Bline[N-1] - Bline[i-1];
			}

			max = Math.max(max, amount);

		}
		System.out.println(max);

	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		int[] Aline = new int[N];
		int[] Bline = new int[N];

		Aline[0] = sc.nextInt();
		for (int i = 1; i < N; i++) {
			Aline[i] += sc.nextInt() + Aline[i-1];
		}


		Bline[0] = sc.nextInt();
		for (int i = 1; i < N; i++) {
			Bline[i] += sc.nextInt() + Bline[i-1];
		}
		int max = 0;
		int amount = 0;
		for (int i = 0; i < N; i++) {
			if (i == 0) {
				amount = Aline[i] + Bline[N-1];
			}else {
				amount = Aline[i] + Bline[N-1] - Bline[i-1];
			}

			max = Math.max(max, amount);

		}
		System.out.println(max);

	} main {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		int[] Aline = new int[N];
		int[] Bline = new int[N];

		Aline[0] = sc.nextInt();
		for (int i = 1; i < N; i++) {
			Aline[i] += sc.nextInt() + Aline[i-1];
		}


		Bline[0] = sc.nextInt();
		for (int i = 1; i < N; i++) {
			Bline[i] += sc.nextInt() + Bline[i-1];
		}
		int max = 0;
		int amount = 0;
		for (int i = 0; i < N; i++) {
			if (i == 0) {
				amount = Aline[i] + Bline[N-1];
			}else {
				amount = Aline[i] + Bline[N-1] - Bline[i-1];
			}

			max = Math.max(max, amount);

		}
		System.out.println(max);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] Aline = new int[N]; Aline new int[N] N int[] Bline = new int[N]; Bline new int[N] N Aline[0] = sc.nextInt() Aline[0] Aline 0 sc.nextInt() sc.nextInt sc for (int i = 1; i < N; i++) {
			Aline[i] += sc.nextInt() + Aline[i-1];
		} int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
			Aline[i] += sc.nextInt() + Aline[i-1];
		} {
			Aline[i] += sc.nextInt() + Aline[i-1];
		} Aline[i] += sc.nextInt() + Aline[i-1] Aline[i] Aline i sc.nextInt() + Aline[i-1] sc.nextInt() sc.nextInt sc Aline[i-1] Aline i-1 i 1 Bline[0] = sc.nextInt() Bline[0] Bline 0 sc.nextInt() sc.nextInt sc for (int i = 1; i < N; i++) {
			Bline[i] += sc.nextInt() + Bline[i-1];
		} int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
			Bline[i] += sc.nextInt() + Bline[i-1];
		} {
			Bline[i] += sc.nextInt() + Bline[i-1];
		} Bline[i] += sc.nextInt() + Bline[i-1] Bline[i] Bline i sc.nextInt() + Bline[i-1] sc.nextInt() sc.nextInt sc Bline[i-1] Bline i-1 i 1 int max = 0; max 0 int amount = 0; amount 0 for (int i = 0; i < N; i++) {
			if (i == 0) {
				amount = Aline[i] + Bline[N-1];
			}else {
				amount = Aline[i] + Bline[N-1] - Bline[i-1];
			}

			max = Math.max(max, amount);

		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			if (i == 0) {
				amount = Aline[i] + Bline[N-1];
			}else {
				amount = Aline[i] + Bline[N-1] - Bline[i-1];
			}

			max = Math.max(max, amount);

		} {
			if (i == 0) {
				amount = Aline[i] + Bline[N-1];
			}else {
				amount = Aline[i] + Bline[N-1] - Bline[i-1];
			}

			max = Math.max(max, amount);

		} if (i == 0) {
				amount = Aline[i] + Bline[N-1];
			}else {
				amount = Aline[i] + Bline[N-1] - Bline[i-1];
			} i == 0 i 0 {
				amount = Aline[i] + Bline[N-1];
			} amount = Aline[i] + Bline[N-1] amount Aline[i] + Bline[N-1] Aline[i] Aline i Bline[N-1] Bline N-1 N 1 {
				amount = Aline[i] + Bline[N-1] - Bline[i-1];
			} amount = Aline[i] + Bline[N-1] - Bline[i-1] amount Aline[i] + Bline[N-1] - Bline[i-1] Aline[i] + Bline[N-1] Aline[i] Aline i Bline[N-1] Bline N-1 N 1 Bline[i-1] Bline i-1 i 1 max = Math.max(max, amount) max Math.max(max, amount) Math.max Math max amount 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) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		int[] Aline = new int[N];
		int[] Bline = new int[N];

		Aline[0] = sc.nextInt();
		for (int i = 1; i < N; i++) {
			Aline[i] += sc.nextInt() + Aline[i-1];
		}


		Bline[0] = sc.nextInt();
		for (int i = 1; i < N; i++) {
			Bline[i] += sc.nextInt() + Bline[i-1];
		}
		int max = 0;
		int amount = 0;
		for (int i = 0; i < N; i++) {
			if (i == 0) {
				amount = Aline[i] + Bline[N-1];
			}else {
				amount = Aline[i] + Bline[N-1] - Bline[i-1];
			}

			max = Math.max(max, amount);

		}
		System.out.println(max);

	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		int[] Aline = new int[N];
		int[] Bline = new int[N];

		Aline[0] = sc.nextInt();
		for (int i = 1; i < N; i++) {
			Aline[i] += sc.nextInt() + Aline[i-1];
		}


		Bline[0] = sc.nextInt();
		for (int i = 1; i < N; i++) {
			Bline[i] += sc.nextInt() + Bline[i-1];
		}
		int max = 0;
		int amount = 0;
		for (int i = 0; i < N; i++) {
			if (i == 0) {
				amount = Aline[i] + Bline[N-1];
			}else {
				amount = Aline[i] + Bline[N-1] - Bline[i-1];
			}

			max = Math.max(max, amount);

		}
		System.out.println(max);

	}
} Main
import java.util.Scanner;



public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		int[] Aline = new int[N];
		int[] Bline = new int[N];

		Aline[0] = sc.nextInt();
		for (int i = 1; i < N; i++) {
			Aline[i] += sc.nextInt() + Aline[i-1];
		}


		Bline[0] = sc.nextInt();
		for (int i = 1; i < N; i++) {
			Bline[i] += sc.nextInt() + Bline[i-1];
		}
		int max = 0;
		int amount = 0;
		for (int i = 0; i < N; i++) {
			if (i == 0) {
				amount = Aline[i] + Bline[N-1];
			}else {
				amount = Aline[i] + Bline[N-1] - Bline[i-1];
			}

			max = Math.max(max, amount);

		}
		System.out.println(max);

	}
}
