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 max = 0;
		for(int i=0;i<n;i++) {
			int total = 0;
			for(int j=0;j<=i;j++) {
				total += a[0][j];
			}
			for(int j=i;j<n;j++) {
				total += a[1][j];
			}
			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 max = 0;
		for(int i=0;i<n;i++) {
			int total = 0;
			for(int j=0;j<=i;j++) {
				total += a[0][j];
			}
			for(int j=i;j<n;j++) {
				total += a[1][j];
			}
			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 max = 0;
		for(int i=0;i<n;i++) {
			int total = 0;
			for(int j=0;j<=i;j++) {
				total += a[0][j];
			}
			for(int j=i;j<n;j++) {
				total += a[1][j];
			}
			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 max = 0;
		for(int i=0;i<n;i++) {
			int total = 0;
			for(int j=0;j<=i;j++) {
				total += a[0][j];
			}
			for(int j=i;j<n;j++) {
				total += a[1][j];
			}
			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 max = 0; max 0 for(int i=0;i<n;i++) {
			int total = 0;
			for(int j=0;j<=i;j++) {
				total += a[0][j];
			}
			for(int j=i;j<n;j++) {
				total += a[1][j];
			}
			if(total>max) max = total;
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			int total = 0;
			for(int j=0;j<=i;j++) {
				total += a[0][j];
			}
			for(int j=i;j<n;j++) {
				total += a[1][j];
			}
			if(total>max) max = total;
		} {
			int total = 0;
			for(int j=0;j<=i;j++) {
				total += a[0][j];
			}
			for(int j=i;j<n;j++) {
				total += a[1][j];
			}
			if(total>max) max = total;
		} int total = 0; total 0 for(int j=0;j<=i;j++) {
				total += a[0][j];
			} int j=0; int j=0; j 0 j<=i j i j++ j++ j {
				total += a[0][j];
			} {
				total += a[0][j];
			} total += a[0][j] total a[0][j] a[0] a 0 j for(int j=i;j<n;j++) {
				total += a[1][j];
			} int j=i; int j=i; j i j<n j n j++ j++ j {
				total += a[1][j];
			} {
				total += a[1][j];
			} total += a[1][j] total a[1][j] a[1] a 1 j if(total>max) max = total; total>max total max 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 max = 0;
		for(int i=0;i<n;i++) {
			int total = 0;
			for(int j=0;j<=i;j++) {
				total += a[0][j];
			}
			for(int j=i;j<n;j++) {
				total += a[1][j];
			}
			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 max = 0;
		for(int i=0;i<n;i++) {
			int total = 0;
			for(int j=0;j<=i;j++) {
				total += a[0][j];
			}
			for(int j=i;j<n;j++) {
				total += a[1][j];
			}
			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 max = 0;
		for(int i=0;i<n;i++) {
			int total = 0;
			for(int j=0;j<=i;j++) {
				total += a[0][j];
			}
			for(int j=i;j<n;j++) {
				total += a[1][j];
			}
			if(total>max) max = total;
		}
		System.out.println(max);
		in.close();
	}

}
