
import java.util.*;
public class Main{
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int A[][] = new int[2][N];
		int sum = 0;
		for(int i=0;i<2;i++){
			for(int j=0;j<N;j++){
				A[i][j] = scan.nextInt();
				if(i==1) sum += A[i][j];
			}
		}
		sum += A[0][0];
		int S[] = new int[N];
		S[0] = sum;
		for(int i=1;i<N;i++){
			sum = sum - A[1][i-1] + A[0][i];
			S[i] = sum;
		}
		Arrays.sort(S);
		System.out.println(S[N-1]);
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int A[][] = new int[2][N];
		int sum = 0;
		for(int i=0;i<2;i++){
			for(int j=0;j<N;j++){
				A[i][j] = scan.nextInt();
				if(i==1) sum += A[i][j];
			}
		}
		sum += A[0][0];
		int S[] = new int[N];
		S[0] = sum;
		for(int i=1;i<N;i++){
			sum = sum - A[1][i-1] + A[0][i];
			S[i] = sum;
		}
		Arrays.sort(S);
		System.out.println(S[N-1]);
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int A[][] = new int[2][N];
		int sum = 0;
		for(int i=0;i<2;i++){
			for(int j=0;j<N;j++){
				A[i][j] = scan.nextInt();
				if(i==1) sum += A[i][j];
			}
		}
		sum += A[0][0];
		int S[] = new int[N];
		S[0] = sum;
		for(int i=1;i<N;i++){
			sum = sum - A[1][i-1] + A[0][i];
			S[i] = sum;
		}
		Arrays.sort(S);
		System.out.println(S[N-1]);
	} main {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int A[][] = new int[2][N];
		int sum = 0;
		for(int i=0;i<2;i++){
			for(int j=0;j<N;j++){
				A[i][j] = scan.nextInt();
				if(i==1) sum += A[i][j];
			}
		}
		sum += A[0][0];
		int S[] = new int[N];
		S[0] = sum;
		for(int i=1;i<N;i++){
			sum = sum - A[1][i-1] + A[0][i];
			S[i] = sum;
		}
		Arrays.sort(S);
		System.out.println(S[N-1]);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int A[][] = new int[2][N]; A new int[2][N] 2 N int sum = 0; sum 0 for(int i=0;i<2;i++){
			for(int j=0;j<N;j++){
				A[i][j] = scan.nextInt();
				if(i==1) sum += A[i][j];
			}
		} 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] = scan.nextInt();
				if(i==1) sum += A[i][j];
			}
		} {
			for(int j=0;j<N;j++){
				A[i][j] = scan.nextInt();
				if(i==1) sum += A[i][j];
			}
		} for(int j=0;j<N;j++){
				A[i][j] = scan.nextInt();
				if(i==1) sum += A[i][j];
			} int j=0; int j=0; j 0 j<N j N j++ j++ j {
				A[i][j] = scan.nextInt();
				if(i==1) sum += A[i][j];
			} {
				A[i][j] = scan.nextInt();
				if(i==1) sum += A[i][j];
			} A[i][j] = scan.nextInt() A[i][j] A[i] A i j scan.nextInt() scan.nextInt scan if(i==1) sum += A[i][j]; i==1 i 1 sum += A[i][j] sum A[i][j] A[i] A i j sum += A[0][0] sum A[0][0] A[0] A 0 0 int S[] = new int[N]; S new int[N] N S[0] = sum S[0] S 0 sum for(int i=1;i<N;i++){
			sum = sum - A[1][i-1] + A[0][i];
			S[i] = sum;
		} int i=1; int i=1; i 1 i<N i N i++ i++ i {
			sum = sum - A[1][i-1] + A[0][i];
			S[i] = sum;
		} {
			sum = sum - A[1][i-1] + A[0][i];
			S[i] = sum;
		} sum = sum - A[1][i-1] + A[0][i] sum sum - A[1][i-1] + A[0][i] sum - A[1][i-1] sum A[1][i-1] A[1] A 1 i-1 i 1 A[0][i] A[0] A 0 i S[i] = sum S[i] S i sum Arrays.sort(S) Arrays.sort Arrays S System.out.println(S[N-1]) System.out.println System.out System System.out S[N-1] S N-1 N 1 String[] args args public class Main{
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int A[][] = new int[2][N];
		int sum = 0;
		for(int i=0;i<2;i++){
			for(int j=0;j<N;j++){
				A[i][j] = scan.nextInt();
				if(i==1) sum += A[i][j];
			}
		}
		sum += A[0][0];
		int S[] = new int[N];
		S[0] = sum;
		for(int i=1;i<N;i++){
			sum = sum - A[1][i-1] + A[0][i];
			S[i] = sum;
		}
		Arrays.sort(S);
		System.out.println(S[N-1]);
	}
} public class Main{
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int A[][] = new int[2][N];
		int sum = 0;
		for(int i=0;i<2;i++){
			for(int j=0;j<N;j++){
				A[i][j] = scan.nextInt();
				if(i==1) sum += A[i][j];
			}
		}
		sum += A[0][0];
		int S[] = new int[N];
		S[0] = sum;
		for(int i=1;i<N;i++){
			sum = sum - A[1][i-1] + A[0][i];
			S[i] = sum;
		}
		Arrays.sort(S);
		System.out.println(S[N-1]);
	}
} Main

import java.util.*;
public class Main{
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int A[][] = new int[2][N];
		int sum = 0;
		for(int i=0;i<2;i++){
			for(int j=0;j<N;j++){
				A[i][j] = scan.nextInt();
				if(i==1) sum += A[i][j];
			}
		}
		sum += A[0][0];
		int S[] = new int[N];
		S[0] = sum;
		for(int i=1;i<N;i++){
			sum = sum - A[1][i-1] + A[0][i];
			S[i] = sum;
		}
		Arrays.sort(S);
		System.out.println(S[N-1]);
	}
}
