import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int[][] a = new int[2][n];
		for(int i=0;i<2;i++) {
			for(int j=0;j<n;j++) {
				a[i][j] = in.nextInt();
			}
		}
		int[][] sum = new int[2][n];
		sum[0][0] = a[0][0];
		sum[1][0] = a[1][0];
		for(int i=1;i<n;i++) {
			sum[0][i] = sum[0][i-1] + a[0][i];
			sum[1][i] = sum[1][i-1] + a[1][i];
		}
		int max = sum[0][0] + sum[1][n-1];
		for(int i=1;i<n;i++) {
			int total = sum[0][i] + sum[1][n-1] - sum[1][i-1];
			if(total>max) {
				max = total;
			}
		}
		System.out.println(max);
		in.close();
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int[][] a = new int[2][n];
		for(int i=0;i<2;i++) {
			for(int j=0;j<n;j++) {
				a[i][j] = in.nextInt();
			}
		}
		int[][] sum = new int[2][n];
		sum[0][0] = a[0][0];
		sum[1][0] = a[1][0];
		for(int i=1;i<n;i++) {
			sum[0][i] = sum[0][i-1] + a[0][i];
			sum[1][i] = sum[1][i-1] + a[1][i];
		}
		int max = sum[0][0] + sum[1][n-1];
		for(int i=1;i<n;i++) {
			int total = sum[0][i] + sum[1][n-1] - sum[1][i-1];
			if(total>max) {
				max = total;
			}
		}
		System.out.println(max);
		in.close();
	}

} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int[][] a = new int[2][n];
		for(int i=0;i<2;i++) {
			for(int j=0;j<n;j++) {
				a[i][j] = in.nextInt();
			}
		}
		int[][] sum = new int[2][n];
		sum[0][0] = a[0][0];
		sum[1][0] = a[1][0];
		for(int i=1;i<n;i++) {
			sum[0][i] = sum[0][i-1] + a[0][i];
			sum[1][i] = sum[1][i-1] + a[1][i];
		}
		int max = sum[0][0] + sum[1][n-1];
		for(int i=1;i<n;i++) {
			int total = sum[0][i] + sum[1][n-1] - sum[1][i-1];
			if(total>max) {
				max = total;
			}
		}
		System.out.println(max);
		in.close();
	} main {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int[][] a = new int[2][n];
		for(int i=0;i<2;i++) {
			for(int j=0;j<n;j++) {
				a[i][j] = in.nextInt();
			}
		}
		int[][] sum = new int[2][n];
		sum[0][0] = a[0][0];
		sum[1][0] = a[1][0];
		for(int i=1;i<n;i++) {
			sum[0][i] = sum[0][i-1] + a[0][i];
			sum[1][i] = sum[1][i-1] + a[1][i];
		}
		int max = sum[0][0] + sum[1][n-1];
		for(int i=1;i<n;i++) {
			int total = sum[0][i] + sum[1][n-1] - sum[1][i-1];
			if(total>max) {
				max = total;
			}
		}
		System.out.println(max);
		in.close();
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = in.nextInt(); n in.nextInt() in.nextInt in 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] = in.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] = in.nextInt();
			}
		} {
			for(int j=0;j<n;j++) {
				a[i][j] = in.nextInt();
			}
		} for(int j=0;j<n;j++) {
				a[i][j] = in.nextInt();
			} int j=0; int j=0; j 0 j<n j n j++ j++ j {
				a[i][j] = in.nextInt();
			} {
				a[i][j] = in.nextInt();
			} a[i][j] = in.nextInt() a[i][j] a[i] a i j in.nextInt() in.nextInt in int[][] sum = new int[2][n]; sum new int[2][n] 2 n sum[0][0] = a[0][0] sum[0][0] sum[0] sum 0 0 a[0][0] a[0] a 0 0 sum[1][0] = a[1][0] sum[1][0] sum[1] sum 1 0 a[1][0] a[1] a 1 0 for(int i=1;i<n;i++) {
			sum[0][i] = sum[0][i-1] + a[0][i];
			sum[1][i] = sum[1][i-1] + a[1][i];
		} int i=1; int i=1; i 1 i<n i n i++ i++ i {
			sum[0][i] = sum[0][i-1] + a[0][i];
			sum[1][i] = sum[1][i-1] + a[1][i];
		} {
			sum[0][i] = sum[0][i-1] + a[0][i];
			sum[1][i] = sum[1][i-1] + a[1][i];
		} sum[0][i] = sum[0][i-1] + a[0][i] sum[0][i] sum[0] sum 0 i sum[0][i-1] + a[0][i] sum[0][i-1] sum[0] sum 0 i-1 i 1 a[0][i] a[0] a 0 i sum[1][i] = sum[1][i-1] + a[1][i] sum[1][i] sum[1] sum 1 i sum[1][i-1] + a[1][i] sum[1][i-1] sum[1] sum 1 i-1 i 1 a[1][i] a[1] a 1 i int max = sum[0][0] + sum[1][n-1]; max sum[0][0] + sum[1][n-1] sum[0][0] sum[0] sum 0 0 sum[1][n-1] sum[1] sum 1 n-1 n 1 for(int i=1;i<n;i++) {
			int total = sum[0][i] + sum[1][n-1] - sum[1][i-1];
			if(total>max) {
				max = total;
			}
		} int i=1; int i=1; i 1 i<n i n i++ i++ i {
			int total = sum[0][i] + sum[1][n-1] - sum[1][i-1];
			if(total>max) {
				max = total;
			}
		} {
			int total = sum[0][i] + sum[1][n-1] - sum[1][i-1];
			if(total>max) {
				max = total;
			}
		} int total = sum[0][i] + sum[1][n-1] - sum[1][i-1]; total sum[0][i] + sum[1][n-1] - sum[1][i-1] sum[0][i] + sum[1][n-1] sum[0][i] sum[0] sum 0 i sum[1][n-1] sum[1] sum 1 n-1 n 1 sum[1][i-1] sum[1] sum 1 i-1 i 1 if(total>max) {
				max = total;
			} total>max total max {
				max = total;
			} max = total max total System.out.println(max) System.out.println System.out System System.out max in.close() in.close in String[] args args public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int[][] a = new int[2][n];
		for(int i=0;i<2;i++) {
			for(int j=0;j<n;j++) {
				a[i][j] = in.nextInt();
			}
		}
		int[][] sum = new int[2][n];
		sum[0][0] = a[0][0];
		sum[1][0] = a[1][0];
		for(int i=1;i<n;i++) {
			sum[0][i] = sum[0][i-1] + a[0][i];
			sum[1][i] = sum[1][i-1] + a[1][i];
		}
		int max = sum[0][0] + sum[1][n-1];
		for(int i=1;i<n;i++) {
			int total = sum[0][i] + sum[1][n-1] - sum[1][i-1];
			if(total>max) {
				max = total;
			}
		}
		System.out.println(max);
		in.close();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int[][] a = new int[2][n];
		for(int i=0;i<2;i++) {
			for(int j=0;j<n;j++) {
				a[i][j] = in.nextInt();
			}
		}
		int[][] sum = new int[2][n];
		sum[0][0] = a[0][0];
		sum[1][0] = a[1][0];
		for(int i=1;i<n;i++) {
			sum[0][i] = sum[0][i-1] + a[0][i];
			sum[1][i] = sum[1][i-1] + a[1][i];
		}
		int max = sum[0][0] + sum[1][n-1];
		for(int i=1;i<n;i++) {
			int total = sum[0][i] + sum[1][n-1] - sum[1][i-1];
			if(total>max) {
				max = total;
			}
		}
		System.out.println(max);
		in.close();
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int[][] a = new int[2][n];
		for(int i=0;i<2;i++) {
			for(int j=0;j<n;j++) {
				a[i][j] = in.nextInt();
			}
		}
		int[][] sum = new int[2][n];
		sum[0][0] = a[0][0];
		sum[1][0] = a[1][0];
		for(int i=1;i<n;i++) {
			sum[0][i] = sum[0][i-1] + a[0][i];
			sum[1][i] = sum[1][i-1] + a[1][i];
		}
		int max = sum[0][0] + sum[1][n-1];
		for(int i=1;i<n;i++) {
			int total = sum[0][i] + sum[1][n-1] - sum[1][i-1];
			if(total>max) {
				max = total;
			}
		}
		System.out.println(max);
		in.close();
	}

}
