import java.util.Scanner;

class Main{
	public static void main(String arg[]) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		sc.nextLine();
		String s1 = sc.nextLine();
		String s2 = sc.nextLine();
		String[] S1 = s1.split(" "); 
		String[] S2 = s2.split(" "); 
		sc.close();
		int max = 0;
		
		for(int i = 0; i < N; i++) {
			if(sum(i,S1,S2) > max) {
				max = sum(i,S1,S2);
			}
		}
		System.out.println(max);
	}
	public static int sum(int down, String[] S1, String[] S2) {
		int sum = 0;
		for( int i = 0; i <= down; i++ ) {
			sum += Integer.parseInt(S1[i]); 
		}
		for(int i = down; i < S2.length; i++){
			sum += Integer.parseInt(S2[i]);;
		}
		return sum;
	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String arg[]) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		sc.nextLine();
		String s1 = sc.nextLine();
		String s2 = sc.nextLine();
		String[] S1 = s1.split(" "); 
		String[] S2 = s2.split(" "); 
		sc.close();
		int max = 0;
		
		for(int i = 0; i < N; i++) {
			if(sum(i,S1,S2) > max) {
				max = sum(i,S1,S2);
			}
		}
		System.out.println(max);
	}
	public static int sum(int down, String[] S1, String[] S2) {
		int sum = 0;
		for( int i = 0; i <= down; i++ ) {
			sum += Integer.parseInt(S1[i]); 
		}
		for(int i = down; i < S2.length; i++){
			sum += Integer.parseInt(S2[i]);;
		}
		return sum;
	}
} Main public static void main(String arg[]) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		sc.nextLine();
		String s1 = sc.nextLine();
		String s2 = sc.nextLine();
		String[] S1 = s1.split(" "); 
		String[] S2 = s2.split(" "); 
		sc.close();
		int max = 0;
		
		for(int i = 0; i < N; i++) {
			if(sum(i,S1,S2) > max) {
				max = sum(i,S1,S2);
			}
		}
		System.out.println(max);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		sc.nextLine();
		String s1 = sc.nextLine();
		String s2 = sc.nextLine();
		String[] S1 = s1.split(" "); 
		String[] S2 = s2.split(" "); 
		sc.close();
		int max = 0;
		
		for(int i = 0; i < N; i++) {
			if(sum(i,S1,S2) > max) {
				max = sum(i,S1,S2);
			}
		}
		System.out.println(max);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc sc.nextLine() sc.nextLine sc String s1 = sc.nextLine(); s1 sc.nextLine() sc.nextLine sc String s2 = sc.nextLine(); s2 sc.nextLine() sc.nextLine sc String[] S1 = s1.split(" "); S1 s1.split(" ") s1.split s1 " " String[] S2 = s2.split(" "); S2 s2.split(" ") s2.split s2 " " sc.close() sc.close sc int max = 0; max 0 for(int i = 0; i < N; i++) {
			if(sum(i,S1,S2) > max) {
				max = sum(i,S1,S2);
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			if(sum(i,S1,S2) > max) {
				max = sum(i,S1,S2);
			}
		} {
			if(sum(i,S1,S2) > max) {
				max = sum(i,S1,S2);
			}
		} if(sum(i,S1,S2) > max) {
				max = sum(i,S1,S2);
			} sum(i,S1,S2) > max sum(i,S1,S2) sum i S1 S2 max {
				max = sum(i,S1,S2);
			} max = sum(i,S1,S2) max sum(i,S1,S2) sum i S1 S2 System.out.println(max) System.out.println System.out System System.out max String arg[] arg public static int sum(int down, String[] S1, String[] S2) {
		int sum = 0;
		for( int i = 0; i <= down; i++ ) {
			sum += Integer.parseInt(S1[i]); 
		}
		for(int i = down; i < S2.length; i++){
			sum += Integer.parseInt(S2[i]);;
		}
		return sum;
	} sum {
		int sum = 0;
		for( int i = 0; i <= down; i++ ) {
			sum += Integer.parseInt(S1[i]); 
		}
		for(int i = down; i < S2.length; i++){
			sum += Integer.parseInt(S2[i]);;
		}
		return sum;
	} int sum = 0; sum 0 for( int i = 0; i <= down; i++ ) {
			sum += Integer.parseInt(S1[i]); 
		} int i = 0; int i = 0; i 0 i <= down i down i++ i++ i {
			sum += Integer.parseInt(S1[i]); 
		} {
			sum += Integer.parseInt(S1[i]); 
		} sum += Integer.parseInt(S1[i]) sum Integer.parseInt(S1[i]) Integer.parseInt Integer S1[i] S1 i for(int i = down; i < S2.length; i++){
			sum += Integer.parseInt(S2[i]);;
		} int i = down; int i = down; i down i < S2.length i S2.length S2 S2.length i++ i++ i {
			sum += Integer.parseInt(S2[i]);;
		} {
			sum += Integer.parseInt(S2[i]);;
		} sum += Integer.parseInt(S2[i]) sum Integer.parseInt(S2[i]) Integer.parseInt Integer S2[i] S2 i return sum; sum int down down String[] S1 S1 String[] S2 S2
import java.util.Scanner;

class Main{
	public static void main(String arg[]) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		sc.nextLine();
		String s1 = sc.nextLine();
		String s2 = sc.nextLine();
		String[] S1 = s1.split(" "); 
		String[] S2 = s2.split(" "); 
		sc.close();
		int max = 0;
		
		for(int i = 0; i < N; i++) {
			if(sum(i,S1,S2) > max) {
				max = sum(i,S1,S2);
			}
		}
		System.out.println(max);
	}
	public static int sum(int down, String[] S1, String[] S2) {
		int sum = 0;
		for( int i = 0; i <= down; i++ ) {
			sum += Integer.parseInt(S1[i]); 
		}
		for(int i = down; i < S2.length; i++){
			sum += Integer.parseInt(S2[i]);;
		}
		return sum;
	}
}