import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] candyCount = new int[2][N];
		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < N; j++) {
				candyCount[i][j] = sc.nextInt();
			}
		}
		int sum = 0;
		int ans = 0;

		for (int i = 0; i < N; i++) {
			sum = 0;
			for (int j = 0; j <= i; j++) {
				sum += candyCount[0][j];
			}
			for (int j = N-1; j >= i; j--) {
				sum += candyCount[1][j];
			}
			ans = Math.max(ans, sum);
		}
		System.out.println(ans);
	}

} 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[][] candyCount = new int[2][N];
		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < N; j++) {
				candyCount[i][j] = sc.nextInt();
			}
		}
		int sum = 0;
		int ans = 0;

		for (int i = 0; i < N; i++) {
			sum = 0;
			for (int j = 0; j <= i; j++) {
				sum += candyCount[0][j];
			}
			for (int j = N-1; j >= i; j--) {
				sum += candyCount[1][j];
			}
			ans = Math.max(ans, sum);
		}
		System.out.println(ans);
	}

} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] candyCount = new int[2][N];
		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < N; j++) {
				candyCount[i][j] = sc.nextInt();
			}
		}
		int sum = 0;
		int ans = 0;

		for (int i = 0; i < N; i++) {
			sum = 0;
			for (int j = 0; j <= i; j++) {
				sum += candyCount[0][j];
			}
			for (int j = N-1; j >= i; j--) {
				sum += candyCount[1][j];
			}
			ans = Math.max(ans, sum);
		}
		System.out.println(ans);
	} main {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] candyCount = new int[2][N];
		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < N; j++) {
				candyCount[i][j] = sc.nextInt();
			}
		}
		int sum = 0;
		int ans = 0;

		for (int i = 0; i < N; i++) {
			sum = 0;
			for (int j = 0; j <= i; j++) {
				sum += candyCount[0][j];
			}
			for (int j = N-1; j >= i; j--) {
				sum += candyCount[1][j];
			}
			ans = Math.max(ans, sum);
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[][] candyCount = new int[2][N]; candyCount new int[2][N] 2 N for (int i = 0; i < 2; i++) {
			for (int j = 0; j < N; j++) {
				candyCount[i][j] = sc.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
			for (int j = 0; j < N; j++) {
				candyCount[i][j] = sc.nextInt();
			}
		} {
			for (int j = 0; j < N; j++) {
				candyCount[i][j] = sc.nextInt();
			}
		} for (int j = 0; j < N; j++) {
				candyCount[i][j] = sc.nextInt();
			} int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
				candyCount[i][j] = sc.nextInt();
			} {
				candyCount[i][j] = sc.nextInt();
			} candyCount[i][j] = sc.nextInt() candyCount[i][j] candyCount[i] candyCount i j sc.nextInt() sc.nextInt sc int sum = 0; sum 0 int ans = 0; ans 0 for (int i = 0; i < N; i++) {
			sum = 0;
			for (int j = 0; j <= i; j++) {
				sum += candyCount[0][j];
			}
			for (int j = N-1; j >= i; j--) {
				sum += candyCount[1][j];
			}
			ans = Math.max(ans, sum);
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			sum = 0;
			for (int j = 0; j <= i; j++) {
				sum += candyCount[0][j];
			}
			for (int j = N-1; j >= i; j--) {
				sum += candyCount[1][j];
			}
			ans = Math.max(ans, sum);
		} {
			sum = 0;
			for (int j = 0; j <= i; j++) {
				sum += candyCount[0][j];
			}
			for (int j = N-1; j >= i; j--) {
				sum += candyCount[1][j];
			}
			ans = Math.max(ans, sum);
		} sum = 0 sum 0 for (int j = 0; j <= i; j++) {
				sum += candyCount[0][j];
			} int j = 0; int j = 0; j 0 j <= i j i j++ j++ j {
				sum += candyCount[0][j];
			} {
				sum += candyCount[0][j];
			} sum += candyCount[0][j] sum candyCount[0][j] candyCount[0] candyCount 0 j for (int j = N-1; j >= i; j--) {
				sum += candyCount[1][j];
			} int j = N-1; int j = N-1; j N-1 N 1 j >= i j i j-- j-- j {
				sum += candyCount[1][j];
			} {
				sum += candyCount[1][j];
			} sum += candyCount[1][j] sum candyCount[1][j] candyCount[1] candyCount 1 j ans = Math.max(ans, sum) ans Math.max(ans, sum) Math.max Math ans sum System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] candyCount = new int[2][N];
		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < N; j++) {
				candyCount[i][j] = sc.nextInt();
			}
		}
		int sum = 0;
		int ans = 0;

		for (int i = 0; i < N; i++) {
			sum = 0;
			for (int j = 0; j <= i; j++) {
				sum += candyCount[0][j];
			}
			for (int j = N-1; j >= i; j--) {
				sum += candyCount[1][j];
			}
			ans = Math.max(ans, sum);
		}
		System.out.println(ans);
	}

} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] candyCount = new int[2][N];
		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < N; j++) {
				candyCount[i][j] = sc.nextInt();
			}
		}
		int sum = 0;
		int ans = 0;

		for (int i = 0; i < N; i++) {
			sum = 0;
			for (int j = 0; j <= i; j++) {
				sum += candyCount[0][j];
			}
			for (int j = N-1; j >= i; j--) {
				sum += candyCount[1][j];
			}
			ans = Math.max(ans, sum);
		}
		System.out.println(ans);
	}

} 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[][] candyCount = new int[2][N];
		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < N; j++) {
				candyCount[i][j] = sc.nextInt();
			}
		}
		int sum = 0;
		int ans = 0;

		for (int i = 0; i < N; i++) {
			sum = 0;
			for (int j = 0; j <= i; j++) {
				sum += candyCount[0][j];
			}
			for (int j = N-1; j >= i; j--) {
				sum += candyCount[1][j];
			}
			ans = Math.max(ans, sum);
		}
		System.out.println(ans);
	}

}