import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int a[][] = new int[2][n];

		for (int i = 0; i < n; i++) {
			a[0][i] = sc.nextInt();
		}

		for (int i = 0; i < n; i++) {
			a[1][i] = sc.nextInt();
		}

		int max = 0;
		int first = 0;
		for (int i = 0; i < n; i++) {
			first += a[0][i];
			int second = 0;
			for (int j = i; j < n; j++) {
				second += a[1][j];
			}
			max = Math.max(max, first + second);
		}

		System.out.println(max);

		sc.close();

	}

} 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 a[][] = new int[2][n];

		for (int i = 0; i < n; i++) {
			a[0][i] = sc.nextInt();
		}

		for (int i = 0; i < n; i++) {
			a[1][i] = sc.nextInt();
		}

		int max = 0;
		int first = 0;
		for (int i = 0; i < n; i++) {
			first += a[0][i];
			int second = 0;
			for (int j = i; j < n; j++) {
				second += a[1][j];
			}
			max = Math.max(max, first + second);
		}

		System.out.println(max);

		sc.close();

	}

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

		for (int i = 0; i < n; i++) {
			a[0][i] = sc.nextInt();
		}

		for (int i = 0; i < n; i++) {
			a[1][i] = sc.nextInt();
		}

		int max = 0;
		int first = 0;
		for (int i = 0; i < n; i++) {
			first += a[0][i];
			int second = 0;
			for (int j = i; j < n; j++) {
				second += a[1][j];
			}
			max = Math.max(max, first + second);
		}

		System.out.println(max);

		sc.close();

	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int a[][] = new int[2][n];

		for (int i = 0; i < n; i++) {
			a[0][i] = sc.nextInt();
		}

		for (int i = 0; i < n; i++) {
			a[1][i] = sc.nextInt();
		}

		int max = 0;
		int first = 0;
		for (int i = 0; i < n; i++) {
			first += a[0][i];
			int second = 0;
			for (int j = i; j < n; j++) {
				second += a[1][j];
			}
			max = Math.max(max, first + second);
		}

		System.out.println(max);

		sc.close();

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int a[][] = new int[2][n]; a new int[2][n] 2 n for (int i = 0; i < n; i++) {
			a[0][i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			a[0][i] = sc.nextInt();
		} {
			a[0][i] = sc.nextInt();
		} a[0][i] = sc.nextInt() a[0][i] a[0] a 0 i sc.nextInt() sc.nextInt sc for (int i = 0; i < n; i++) {
			a[1][i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			a[1][i] = sc.nextInt();
		} {
			a[1][i] = sc.nextInt();
		} a[1][i] = sc.nextInt() a[1][i] a[1] a 1 i sc.nextInt() sc.nextInt sc int max = 0; max 0 int first = 0; first 0 for (int i = 0; i < n; i++) {
			first += a[0][i];
			int second = 0;
			for (int j = i; j < n; j++) {
				second += a[1][j];
			}
			max = Math.max(max, first + second);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			first += a[0][i];
			int second = 0;
			for (int j = i; j < n; j++) {
				second += a[1][j];
			}
			max = Math.max(max, first + second);
		} {
			first += a[0][i];
			int second = 0;
			for (int j = i; j < n; j++) {
				second += a[1][j];
			}
			max = Math.max(max, first + second);
		} first += a[0][i] first a[0][i] a[0] a 0 i int second = 0; second 0 for (int j = i; j < n; j++) {
				second += a[1][j];
			} int j = i; int j = i; j i j < n j n j++ j++ j {
				second += a[1][j];
			} {
				second += a[1][j];
			} second += a[1][j] second a[1][j] a[1] a 1 j max = Math.max(max, first + second) max Math.max(max, first + second) Math.max Math max first + second first second System.out.println(max) System.out.println System.out System System.out max sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int a[][] = new int[2][n];

		for (int i = 0; i < n; i++) {
			a[0][i] = sc.nextInt();
		}

		for (int i = 0; i < n; i++) {
			a[1][i] = sc.nextInt();
		}

		int max = 0;
		int first = 0;
		for (int i = 0; i < n; i++) {
			first += a[0][i];
			int second = 0;
			for (int j = i; j < n; j++) {
				second += a[1][j];
			}
			max = Math.max(max, first + second);
		}

		System.out.println(max);

		sc.close();

	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int a[][] = new int[2][n];

		for (int i = 0; i < n; i++) {
			a[0][i] = sc.nextInt();
		}

		for (int i = 0; i < n; i++) {
			a[1][i] = sc.nextInt();
		}

		int max = 0;
		int first = 0;
		for (int i = 0; i < n; i++) {
			first += a[0][i];
			int second = 0;
			for (int j = i; j < n; j++) {
				second += a[1][j];
			}
			max = Math.max(max, first + second);
		}

		System.out.println(max);

		sc.close();

	}

} 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 a[][] = new int[2][n];

		for (int i = 0; i < n; i++) {
			a[0][i] = sc.nextInt();
		}

		for (int i = 0; i < n; i++) {
			a[1][i] = sc.nextInt();
		}

		int max = 0;
		int first = 0;
		for (int i = 0; i < n; i++) {
			first += a[0][i];
			int second = 0;
			for (int j = i; j < n; j++) {
				second += a[1][j];
			}
			max = Math.max(max, first + second);
		}

		System.out.println(max);

		sc.close();

	}

}