import java.util.Arrays;
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 j=0; j<2; j++) {
			for(int i=0; i<N; i++) {
				A[j][i] = sc.nextInt();
			}
		}

		int[] sum = new int[N];
		for(int k=0; k<N; k++) {
			for(int l=0; l<=k; l++) {
				sum[k] += A[0][l];
			}for(int m=N-1; m>=k; m--) {
				sum[k] += A[1][m];
			}
		}Arrays.sort(sum);

		System.out.println(sum[N-1]);

	}

} import java.util.Arrays; Arrays java.util 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 j=0; j<2; j++) {
			for(int i=0; i<N; i++) {
				A[j][i] = sc.nextInt();
			}
		}

		int[] sum = new int[N];
		for(int k=0; k<N; k++) {
			for(int l=0; l<=k; l++) {
				sum[k] += A[0][l];
			}for(int m=N-1; m>=k; m--) {
				sum[k] += A[1][m];
			}
		}Arrays.sort(sum);

		System.out.println(sum[N-1]);

	}

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

		int[] sum = new int[N];
		for(int k=0; k<N; k++) {
			for(int l=0; l<=k; l++) {
				sum[k] += A[0][l];
			}for(int m=N-1; m>=k; m--) {
				sum[k] += A[1][m];
			}
		}Arrays.sort(sum);

		System.out.println(sum[N-1]);

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

		for(int j=0; j<2; j++) {
			for(int i=0; i<N; i++) {
				A[j][i] = sc.nextInt();
			}
		}

		int[] sum = new int[N];
		for(int k=0; k<N; k++) {
			for(int l=0; l<=k; l++) {
				sum[k] += A[0][l];
			}for(int m=N-1; m>=k; m--) {
				sum[k] += A[1][m];
			}
		}Arrays.sort(sum);

		System.out.println(sum[N-1]);

	} 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 j=0; j<2; j++) {
			for(int i=0; i<N; i++) {
				A[j][i] = sc.nextInt();
			}
		} int j=0; int j=0; j 0 j<2 j 2 j++ j++ j {
			for(int i=0; i<N; i++) {
				A[j][i] = sc.nextInt();
			}
		} {
			for(int i=0; i<N; i++) {
				A[j][i] = sc.nextInt();
			}
		} for(int i=0; i<N; i++) {
				A[j][i] = sc.nextInt();
			} int i=0; int i=0; i 0 i<N i N i++ i++ i {
				A[j][i] = sc.nextInt();
			} {
				A[j][i] = sc.nextInt();
			} A[j][i] = sc.nextInt() A[j][i] A[j] A j i sc.nextInt() sc.nextInt sc int[] sum = new int[N]; sum new int[N] N for(int k=0; k<N; k++) {
			for(int l=0; l<=k; l++) {
				sum[k] += A[0][l];
			}for(int m=N-1; m>=k; m--) {
				sum[k] += A[1][m];
			}
		} int k=0; int k=0; k 0 k<N k N k++ k++ k {
			for(int l=0; l<=k; l++) {
				sum[k] += A[0][l];
			}for(int m=N-1; m>=k; m--) {
				sum[k] += A[1][m];
			}
		} {
			for(int l=0; l<=k; l++) {
				sum[k] += A[0][l];
			}for(int m=N-1; m>=k; m--) {
				sum[k] += A[1][m];
			}
		} for(int l=0; l<=k; l++) {
				sum[k] += A[0][l];
			} int l=0; int l=0; l 0 l<=k l k l++ l++ l {
				sum[k] += A[0][l];
			} {
				sum[k] += A[0][l];
			} sum[k] += A[0][l] sum[k] sum k A[0][l] A[0] A 0 l for(int m=N-1; m>=k; m--) {
				sum[k] += A[1][m];
			} int m=N-1; int m=N-1; m N-1 N 1 m>=k m k m-- m-- m {
				sum[k] += A[1][m];
			} {
				sum[k] += A[1][m];
			} sum[k] += A[1][m] sum[k] sum k A[1][m] A[1] A 1 m Arrays.sort(sum) Arrays.sort Arrays sum System.out.println(sum[N-1]) System.out.println System.out System System.out sum[N-1] sum N-1 N 1 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 j=0; j<2; j++) {
			for(int i=0; i<N; i++) {
				A[j][i] = sc.nextInt();
			}
		}

		int[] sum = new int[N];
		for(int k=0; k<N; k++) {
			for(int l=0; l<=k; l++) {
				sum[k] += A[0][l];
			}for(int m=N-1; m>=k; m--) {
				sum[k] += A[1][m];
			}
		}Arrays.sort(sum);

		System.out.println(sum[N-1]);

	}

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

		int[] sum = new int[N];
		for(int k=0; k<N; k++) {
			for(int l=0; l<=k; l++) {
				sum[k] += A[0][l];
			}for(int m=N-1; m>=k; m--) {
				sum[k] += A[1][m];
			}
		}Arrays.sort(sum);

		System.out.println(sum[N-1]);

	}

} Main
import java.util.Arrays;
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 j=0; j<2; j++) {
			for(int i=0; i<N; i++) {
				A[j][i] = sc.nextInt();
			}
		}

		int[] sum = new int[N];
		for(int k=0; k<N; k++) {
			for(int l=0; l<=k; l++) {
				sum[k] += A[0][l];
			}for(int m=N-1; m>=k; m--) {
				sum[k] += A[1][m];
			}
		}Arrays.sort(sum);

		System.out.println(sum[N-1]);

	}

}
