import java.util.*;

public class Main {
	public static void main(String... args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<Integer> line = new ArrayList<>();
		while (sc.hasNext()) {
			line.add(sc.nextInt());
		}
		sc.close();

		int result = 0;

		for (int index = 1 ; index <= n ; index++) {
			int target = 0;
			for (int i = 0 ; i < index ; i++) {
				target = target + line.get(i);
			}
			for (int k = 2 * n - 1 ; k >= n + index - 1 ; k--) {
				target = target + line.get(k);
			}
			if (result <= target) {
				result = target;
			}
		}
		System.out.println(result);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String... args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<Integer> line = new ArrayList<>();
		while (sc.hasNext()) {
			line.add(sc.nextInt());
		}
		sc.close();

		int result = 0;

		for (int index = 1 ; index <= n ; index++) {
			int target = 0;
			for (int i = 0 ; i < index ; i++) {
				target = target + line.get(i);
			}
			for (int k = 2 * n - 1 ; k >= n + index - 1 ; k--) {
				target = target + line.get(k);
			}
			if (result <= target) {
				result = target;
			}
		}
		System.out.println(result);
	}
} Main public static void main(String... args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<Integer> line = new ArrayList<>();
		while (sc.hasNext()) {
			line.add(sc.nextInt());
		}
		sc.close();

		int result = 0;

		for (int index = 1 ; index <= n ; index++) {
			int target = 0;
			for (int i = 0 ; i < index ; i++) {
				target = target + line.get(i);
			}
			for (int k = 2 * n - 1 ; k >= n + index - 1 ; k--) {
				target = target + line.get(k);
			}
			if (result <= target) {
				result = target;
			}
		}
		System.out.println(result);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<Integer> line = new ArrayList<>();
		while (sc.hasNext()) {
			line.add(sc.nextInt());
		}
		sc.close();

		int result = 0;

		for (int index = 1 ; index <= n ; index++) {
			int target = 0;
			for (int i = 0 ; i < index ; i++) {
				target = target + line.get(i);
			}
			for (int k = 2 * n - 1 ; k >= n + index - 1 ; k--) {
				target = target + line.get(k);
			}
			if (result <= target) {
				result = target;
			}
		}
		System.out.println(result);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc List<Integer> line = new ArrayList<>(); line new ArrayList<>() while (sc.hasNext()) {
			line.add(sc.nextInt());
		} sc.hasNext() sc.hasNext sc {
			line.add(sc.nextInt());
		} line.add(sc.nextInt()) line.add line sc.nextInt() sc.nextInt sc sc.close() sc.close sc int result = 0; result 0 for (int index = 1 ; index <= n ; index++) {
			int target = 0;
			for (int i = 0 ; i < index ; i++) {
				target = target + line.get(i);
			}
			for (int k = 2 * n - 1 ; k >= n + index - 1 ; k--) {
				target = target + line.get(k);
			}
			if (result <= target) {
				result = target;
			}
		} int index = 1 ; int index = 1 ; index 1 index <= n index n index++ index++ index {
			int target = 0;
			for (int i = 0 ; i < index ; i++) {
				target = target + line.get(i);
			}
			for (int k = 2 * n - 1 ; k >= n + index - 1 ; k--) {
				target = target + line.get(k);
			}
			if (result <= target) {
				result = target;
			}
		} {
			int target = 0;
			for (int i = 0 ; i < index ; i++) {
				target = target + line.get(i);
			}
			for (int k = 2 * n - 1 ; k >= n + index - 1 ; k--) {
				target = target + line.get(k);
			}
			if (result <= target) {
				result = target;
			}
		} int target = 0; target 0 for (int i = 0 ; i < index ; i++) {
				target = target + line.get(i);
			} int i = 0 ; int i = 0 ; i 0 i < index i index i++ i++ i {
				target = target + line.get(i);
			} {
				target = target + line.get(i);
			} target = target + line.get(i) target target + line.get(i) target line.get(i) line.get line i for (int k = 2 * n - 1 ; k >= n + index - 1 ; k--) {
				target = target + line.get(k);
			} int k = 2 * n - 1 ; int k = 2 * n - 1 ; k 2 * n - 1 2 * n 2 n 1 k >= n + index - 1 k n + index - 1 n + index n index 1 k-- k-- k {
				target = target + line.get(k);
			} {
				target = target + line.get(k);
			} target = target + line.get(k) target target + line.get(k) target line.get(k) line.get line k if (result <= target) {
				result = target;
			} result <= target result target {
				result = target;
			} result = target result target System.out.println(result) System.out.println System.out System System.out result String... args args public class Main {
	public static void main(String... args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<Integer> line = new ArrayList<>();
		while (sc.hasNext()) {
			line.add(sc.nextInt());
		}
		sc.close();

		int result = 0;

		for (int index = 1 ; index <= n ; index++) {
			int target = 0;
			for (int i = 0 ; i < index ; i++) {
				target = target + line.get(i);
			}
			for (int k = 2 * n - 1 ; k >= n + index - 1 ; k--) {
				target = target + line.get(k);
			}
			if (result <= target) {
				result = target;
			}
		}
		System.out.println(result);
	}
} public class Main {
	public static void main(String... args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<Integer> line = new ArrayList<>();
		while (sc.hasNext()) {
			line.add(sc.nextInt());
		}
		sc.close();

		int result = 0;

		for (int index = 1 ; index <= n ; index++) {
			int target = 0;
			for (int i = 0 ; i < index ; i++) {
				target = target + line.get(i);
			}
			for (int k = 2 * n - 1 ; k >= n + index - 1 ; k--) {
				target = target + line.get(k);
			}
			if (result <= target) {
				result = target;
			}
		}
		System.out.println(result);
	}
} Main
import java.util.*;

public class Main {
	public static void main(String... args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<Integer> line = new ArrayList<>();
		while (sc.hasNext()) {
			line.add(sc.nextInt());
		}
		sc.close();

		int result = 0;

		for (int index = 1 ; index <= n ; index++) {
			int target = 0;
			for (int i = 0 ; i < index ; i++) {
				target = target + line.get(i);
			}
			for (int k = 2 * n - 1 ; k >= n + index - 1 ; k--) {
				target = target + line.get(k);
			}
			if (result <= target) {
				result = target;
			}
		}
		System.out.println(result);
	}
}
