import java.util.*;

public class Main {

	public static void main(String[] args) {
		new Main().execute();
	}

	public void execute() {
		Scanner sc = new Scanner(System.in);
		final int N = sc.nextInt();

		int[] ameUe = new int[N];
		int[] ameShita = new int[N];
		for (int i = 0; i < N; i++) {
			int a1i = sc.nextInt();
			if (i > 0) {
				ameUe[i] = ameUe[i - 1] + a1i;
			} else {
				ameUe[i] = a1i;
			}
		}

		for (int i = 0; i < N; i++) {
			int a2i = sc.nextInt();
			if (i > 0) {
				ameShita[i] = ameShita[i - 1] + a2i;
			} else {
				ameShita[i] = a2i;
			}
		}

		int maxAme = 0;
		for (int i = 0; i < N; i++) {
			int ame;
			if (i == 0) {
				ame = ameUe[0] + ameShita[N - 1];
			} else {
				ame = ameUe[i] + ameShita[N - 1] - ameShita[i - 1];
			}
			maxAme = Math.max(maxAme, ame);
		}

		System.out.println(maxAme);
		sc.close();
	}

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

	public static void main(String[] args) {
		new Main().execute();
	}

	public void execute() {
		Scanner sc = new Scanner(System.in);
		final int N = sc.nextInt();

		int[] ameUe = new int[N];
		int[] ameShita = new int[N];
		for (int i = 0; i < N; i++) {
			int a1i = sc.nextInt();
			if (i > 0) {
				ameUe[i] = ameUe[i - 1] + a1i;
			} else {
				ameUe[i] = a1i;
			}
		}

		for (int i = 0; i < N; i++) {
			int a2i = sc.nextInt();
			if (i > 0) {
				ameShita[i] = ameShita[i - 1] + a2i;
			} else {
				ameShita[i] = a2i;
			}
		}

		int maxAme = 0;
		for (int i = 0; i < N; i++) {
			int ame;
			if (i == 0) {
				ame = ameUe[0] + ameShita[N - 1];
			} else {
				ame = ameUe[i] + ameShita[N - 1] - ameShita[i - 1];
			}
			maxAme = Math.max(maxAme, ame);
		}

		System.out.println(maxAme);
		sc.close();
	}

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

		int[] ameUe = new int[N];
		int[] ameShita = new int[N];
		for (int i = 0; i < N; i++) {
			int a1i = sc.nextInt();
			if (i > 0) {
				ameUe[i] = ameUe[i - 1] + a1i;
			} else {
				ameUe[i] = a1i;
			}
		}

		for (int i = 0; i < N; i++) {
			int a2i = sc.nextInt();
			if (i > 0) {
				ameShita[i] = ameShita[i - 1] + a2i;
			} else {
				ameShita[i] = a2i;
			}
		}

		int maxAme = 0;
		for (int i = 0; i < N; i++) {
			int ame;
			if (i == 0) {
				ame = ameUe[0] + ameShita[N - 1];
			} else {
				ame = ameUe[i] + ameShita[N - 1] - ameShita[i - 1];
			}
			maxAme = Math.max(maxAme, ame);
		}

		System.out.println(maxAme);
		sc.close();
	} execute {
		Scanner sc = new Scanner(System.in);
		final int N = sc.nextInt();

		int[] ameUe = new int[N];
		int[] ameShita = new int[N];
		for (int i = 0; i < N; i++) {
			int a1i = sc.nextInt();
			if (i > 0) {
				ameUe[i] = ameUe[i - 1] + a1i;
			} else {
				ameUe[i] = a1i;
			}
		}

		for (int i = 0; i < N; i++) {
			int a2i = sc.nextInt();
			if (i > 0) {
				ameShita[i] = ameShita[i - 1] + a2i;
			} else {
				ameShita[i] = a2i;
			}
		}

		int maxAme = 0;
		for (int i = 0; i < N; i++) {
			int ame;
			if (i == 0) {
				ame = ameUe[0] + ameShita[N - 1];
			} else {
				ame = ameUe[i] + ameShita[N - 1] - ameShita[i - 1];
			}
			maxAme = Math.max(maxAme, ame);
		}

		System.out.println(maxAme);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] ameUe = new int[N]; ameUe new int[N] N int[] ameShita = new int[N]; ameShita new int[N] N for (int i = 0; i < N; i++) {
			int a1i = sc.nextInt();
			if (i > 0) {
				ameUe[i] = ameUe[i - 1] + a1i;
			} else {
				ameUe[i] = a1i;
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			int a1i = sc.nextInt();
			if (i > 0) {
				ameUe[i] = ameUe[i - 1] + a1i;
			} else {
				ameUe[i] = a1i;
			}
		} {
			int a1i = sc.nextInt();
			if (i > 0) {
				ameUe[i] = ameUe[i - 1] + a1i;
			} else {
				ameUe[i] = a1i;
			}
		} int a1i = sc.nextInt(); a1i sc.nextInt() sc.nextInt sc if (i > 0) {
				ameUe[i] = ameUe[i - 1] + a1i;
			} else {
				ameUe[i] = a1i;
			} i > 0 i 0 {
				ameUe[i] = ameUe[i - 1] + a1i;
			} ameUe[i] = ameUe[i - 1] + a1i ameUe[i] ameUe i ameUe[i - 1] + a1i ameUe[i - 1] ameUe i - 1 i 1 a1i {
				ameUe[i] = a1i;
			} ameUe[i] = a1i ameUe[i] ameUe i a1i for (int i = 0; i < N; i++) {
			int a2i = sc.nextInt();
			if (i > 0) {
				ameShita[i] = ameShita[i - 1] + a2i;
			} else {
				ameShita[i] = a2i;
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			int a2i = sc.nextInt();
			if (i > 0) {
				ameShita[i] = ameShita[i - 1] + a2i;
			} else {
				ameShita[i] = a2i;
			}
		} {
			int a2i = sc.nextInt();
			if (i > 0) {
				ameShita[i] = ameShita[i - 1] + a2i;
			} else {
				ameShita[i] = a2i;
			}
		} int a2i = sc.nextInt(); a2i sc.nextInt() sc.nextInt sc if (i > 0) {
				ameShita[i] = ameShita[i - 1] + a2i;
			} else {
				ameShita[i] = a2i;
			} i > 0 i 0 {
				ameShita[i] = ameShita[i - 1] + a2i;
			} ameShita[i] = ameShita[i - 1] + a2i ameShita[i] ameShita i ameShita[i - 1] + a2i ameShita[i - 1] ameShita i - 1 i 1 a2i {
				ameShita[i] = a2i;
			} ameShita[i] = a2i ameShita[i] ameShita i a2i int maxAme = 0; maxAme 0 for (int i = 0; i < N; i++) {
			int ame;
			if (i == 0) {
				ame = ameUe[0] + ameShita[N - 1];
			} else {
				ame = ameUe[i] + ameShita[N - 1] - ameShita[i - 1];
			}
			maxAme = Math.max(maxAme, ame);
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			int ame;
			if (i == 0) {
				ame = ameUe[0] + ameShita[N - 1];
			} else {
				ame = ameUe[i] + ameShita[N - 1] - ameShita[i - 1];
			}
			maxAme = Math.max(maxAme, ame);
		} {
			int ame;
			if (i == 0) {
				ame = ameUe[0] + ameShita[N - 1];
			} else {
				ame = ameUe[i] + ameShita[N - 1] - ameShita[i - 1];
			}
			maxAme = Math.max(maxAme, ame);
		} int ame; ame if (i == 0) {
				ame = ameUe[0] + ameShita[N - 1];
			} else {
				ame = ameUe[i] + ameShita[N - 1] - ameShita[i - 1];
			} i == 0 i 0 {
				ame = ameUe[0] + ameShita[N - 1];
			} ame = ameUe[0] + ameShita[N - 1] ame ameUe[0] + ameShita[N - 1] ameUe[0] ameUe 0 ameShita[N - 1] ameShita N - 1 N 1 {
				ame = ameUe[i] + ameShita[N - 1] - ameShita[i - 1];
			} ame = ameUe[i] + ameShita[N - 1] - ameShita[i - 1] ame ameUe[i] + ameShita[N - 1] - ameShita[i - 1] ameUe[i] + ameShita[N - 1] ameUe[i] ameUe i ameShita[N - 1] ameShita N - 1 N 1 ameShita[i - 1] ameShita i - 1 i 1 maxAme = Math.max(maxAme, ame) maxAme Math.max(maxAme, ame) Math.max Math maxAme ame System.out.println(maxAme) System.out.println System.out System System.out maxAme sc.close() sc.close sc public class Main {

	public static void main(String[] args) {
		new Main().execute();
	}

	public void execute() {
		Scanner sc = new Scanner(System.in);
		final int N = sc.nextInt();

		int[] ameUe = new int[N];
		int[] ameShita = new int[N];
		for (int i = 0; i < N; i++) {
			int a1i = sc.nextInt();
			if (i > 0) {
				ameUe[i] = ameUe[i - 1] + a1i;
			} else {
				ameUe[i] = a1i;
			}
		}

		for (int i = 0; i < N; i++) {
			int a2i = sc.nextInt();
			if (i > 0) {
				ameShita[i] = ameShita[i - 1] + a2i;
			} else {
				ameShita[i] = a2i;
			}
		}

		int maxAme = 0;
		for (int i = 0; i < N; i++) {
			int ame;
			if (i == 0) {
				ame = ameUe[0] + ameShita[N - 1];
			} else {
				ame = ameUe[i] + ameShita[N - 1] - ameShita[i - 1];
			}
			maxAme = Math.max(maxAme, ame);
		}

		System.out.println(maxAme);
		sc.close();
	}

} public class Main {

	public static void main(String[] args) {
		new Main().execute();
	}

	public void execute() {
		Scanner sc = new Scanner(System.in);
		final int N = sc.nextInt();

		int[] ameUe = new int[N];
		int[] ameShita = new int[N];
		for (int i = 0; i < N; i++) {
			int a1i = sc.nextInt();
			if (i > 0) {
				ameUe[i] = ameUe[i - 1] + a1i;
			} else {
				ameUe[i] = a1i;
			}
		}

		for (int i = 0; i < N; i++) {
			int a2i = sc.nextInt();
			if (i > 0) {
				ameShita[i] = ameShita[i - 1] + a2i;
			} else {
				ameShita[i] = a2i;
			}
		}

		int maxAme = 0;
		for (int i = 0; i < N; i++) {
			int ame;
			if (i == 0) {
				ame = ameUe[0] + ameShita[N - 1];
			} else {
				ame = ameUe[i] + ameShita[N - 1] - ameShita[i - 1];
			}
			maxAme = Math.max(maxAme, ame);
		}

		System.out.println(maxAme);
		sc.close();
	}

} Main
import java.util.*;

public class Main {

	public static void main(String[] args) {
		new Main().execute();
	}

	public void execute() {
		Scanner sc = new Scanner(System.in);
		final int N = sc.nextInt();

		int[] ameUe = new int[N];
		int[] ameShita = new int[N];
		for (int i = 0; i < N; i++) {
			int a1i = sc.nextInt();
			if (i > 0) {
				ameUe[i] = ameUe[i - 1] + a1i;
			} else {
				ameUe[i] = a1i;
			}
		}

		for (int i = 0; i < N; i++) {
			int a2i = sc.nextInt();
			if (i > 0) {
				ameShita[i] = ameShita[i - 1] + a2i;
			} else {
				ameShita[i] = a2i;
			}
		}

		int maxAme = 0;
		for (int i = 0; i < N; i++) {
			int ame;
			if (i == 0) {
				ame = ameUe[0] + ameShita[N - 1];
			} else {
				ame = ameUe[i] + ameShita[N - 1] - ameShita[i - 1];
			}
			maxAme = Math.max(maxAme, ame);
		}

		System.out.println(maxAme);
		sc.close();
	}

}