import java.util.Scanner;

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 < 2; i++) {
			for(int j = 0; j < N; j++) A[i][j] = sc.nextInt();
		}
		int[] upper_sum = new int[N];
		int[] lower_sum = new int[N];
		for(int i = 0; i < N; i++) {
			upper_sum[i] = (i == 0) ? A[0][i] : upper_sum[i - 1] + A[0][i];
		}
		for(int i = N - 1; i >= 0; i--) {
			lower_sum[i] = (i == N - 1) ? A[1][i] : lower_sum[i + 1] + A[1][i];
		}
		int ans = 0;
		for(int i = 0; i < N; i++) {
			ans = Math.max(ans, upper_sum[i] + lower_sum[i]);
		}
		System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util 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 < 2; i++) {
			for(int j = 0; j < N; j++) A[i][j] = sc.nextInt();
		}
		int[] upper_sum = new int[N];
		int[] lower_sum = new int[N];
		for(int i = 0; i < N; i++) {
			upper_sum[i] = (i == 0) ? A[0][i] : upper_sum[i - 1] + A[0][i];
		}
		for(int i = N - 1; i >= 0; i--) {
			lower_sum[i] = (i == N - 1) ? A[1][i] : lower_sum[i + 1] + A[1][i];
		}
		int ans = 0;
		for(int i = 0; i < N; i++) {
			ans = Math.max(ans, upper_sum[i] + lower_sum[i]);
		}
		System.out.println(ans);
	}
} 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 < 2; i++) {
			for(int j = 0; j < N; j++) A[i][j] = sc.nextInt();
		}
		int[] upper_sum = new int[N];
		int[] lower_sum = new int[N];
		for(int i = 0; i < N; i++) {
			upper_sum[i] = (i == 0) ? A[0][i] : upper_sum[i - 1] + A[0][i];
		}
		for(int i = N - 1; i >= 0; i--) {
			lower_sum[i] = (i == N - 1) ? A[1][i] : lower_sum[i + 1] + A[1][i];
		}
		int ans = 0;
		for(int i = 0; i < N; i++) {
			ans = Math.max(ans, upper_sum[i] + lower_sum[i]);
		}
		System.out.println(ans);
	} main {
		Scanner sc=new Scanner(System.in);
		int N = sc.nextInt();
		int[][] A = new int[2][N];
		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < N; j++) A[i][j] = sc.nextInt();
		}
		int[] upper_sum = new int[N];
		int[] lower_sum = new int[N];
		for(int i = 0; i < N; i++) {
			upper_sum[i] = (i == 0) ? A[0][i] : upper_sum[i - 1] + A[0][i];
		}
		for(int i = N - 1; i >= 0; i--) {
			lower_sum[i] = (i == N - 1) ? A[1][i] : lower_sum[i + 1] + A[1][i];
		}
		int ans = 0;
		for(int i = 0; i < N; i++) {
			ans = Math.max(ans, upper_sum[i] + lower_sum[i]);
		}
		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[][] A = new int[2][N]; A new int[2][N] 2 N for(int i = 0; i < 2; i++) {
			for(int j = 0; j < N; j++) A[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++) A[i][j] = sc.nextInt();
		} {
			for(int j = 0; j < N; j++) A[i][j] = sc.nextInt();
		} for(int j = 0; j < N; j++) A[i][j] = sc.nextInt(); int j = 0; int j = 0; j 0 j < N j N j++ j++ j A[i][j] = sc.nextInt(); A[i][j] = sc.nextInt() A[i][j] A[i] A i j sc.nextInt() sc.nextInt sc int[] upper_sum = new int[N]; upper_sum new int[N] N int[] lower_sum = new int[N]; lower_sum new int[N] N for(int i = 0; i < N; i++) {
			upper_sum[i] = (i == 0) ? A[0][i] : upper_sum[i - 1] + A[0][i];
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			upper_sum[i] = (i == 0) ? A[0][i] : upper_sum[i - 1] + A[0][i];
		} {
			upper_sum[i] = (i == 0) ? A[0][i] : upper_sum[i - 1] + A[0][i];
		} upper_sum[i] = (i == 0) ? A[0][i] : upper_sum[i - 1] + A[0][i] upper_sum[i] upper_sum i (i == 0) ? A[0][i] : upper_sum[i - 1] + A[0][i] (i == 0) i 0 A[0][i] A[0] A 0 i upper_sum[i - 1] + A[0][i] upper_sum[i - 1] upper_sum i - 1 i 1 A[0][i] A[0] A 0 i for(int i = N - 1; i >= 0; i--) {
			lower_sum[i] = (i == N - 1) ? A[1][i] : lower_sum[i + 1] + A[1][i];
		} int i = N - 1; int i = N - 1; i N - 1 N 1 i >= 0 i 0 i-- i-- i {
			lower_sum[i] = (i == N - 1) ? A[1][i] : lower_sum[i + 1] + A[1][i];
		} {
			lower_sum[i] = (i == N - 1) ? A[1][i] : lower_sum[i + 1] + A[1][i];
		} lower_sum[i] = (i == N - 1) ? A[1][i] : lower_sum[i + 1] + A[1][i] lower_sum[i] lower_sum i (i == N - 1) ? A[1][i] : lower_sum[i + 1] + A[1][i] (i == N - 1) i N - 1 N 1 A[1][i] A[1] A 1 i lower_sum[i + 1] + A[1][i] lower_sum[i + 1] lower_sum i + 1 i 1 A[1][i] A[1] A 1 i int ans = 0; ans 0 for(int i = 0; i < N; i++) {
			ans = Math.max(ans, upper_sum[i] + lower_sum[i]);
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			ans = Math.max(ans, upper_sum[i] + lower_sum[i]);
		} {
			ans = Math.max(ans, upper_sum[i] + lower_sum[i]);
		} ans = Math.max(ans, upper_sum[i] + lower_sum[i]) ans Math.max(ans, upper_sum[i] + lower_sum[i]) Math.max Math ans upper_sum[i] + lower_sum[i] upper_sum[i] upper_sum i lower_sum[i] lower_sum i System.out.println(ans) System.out.println System.out System System.out ans String args[] args
import java.util.Scanner;

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 < 2; i++) {
			for(int j = 0; j < N; j++) A[i][j] = sc.nextInt();
		}
		int[] upper_sum = new int[N];
		int[] lower_sum = new int[N];
		for(int i = 0; i < N; i++) {
			upper_sum[i] = (i == 0) ? A[0][i] : upper_sum[i - 1] + A[0][i];
		}
		for(int i = N - 1; i >= 0; i--) {
			lower_sum[i] = (i == N - 1) ? A[1][i] : lower_sum[i + 1] + A[1][i];
		}
		int ans = 0;
		for(int i = 0; i < N; i++) {
			ans = Math.max(ans, upper_sum[i] + lower_sum[i]);
		}
		System.out.println(ans);
	}
}