import java.util.Scanner;

class Main {

	public static void main(String args[]){

		Scanner scan = new Scanner(System.in);
		int n;
		n = scan.nextInt();
		int x[][] = new int[2][n];
		
		for(int i = 0; i < 2; i++)
			for(int j = 0; j < n; j++)
				x[i][j] = scan.nextInt();
		
		scan.close();
		
		int sum;
		int max = 0;
		

		for(int i = 0; i < n; i++){
			sum = 0;
			for(int j = 0; j <= i; j++){
				sum += x[0][j];
			}
			for(int j = i; j < n; j++){
				sum += x[1][j];
			}
			if(sum >= max)max =sum;
		}	
		System.out.print(max);
	}
} import java.util.Scanner; Scanner java.util class Main {

	public static void main(String args[]){

		Scanner scan = new Scanner(System.in);
		int n;
		n = scan.nextInt();
		int x[][] = new int[2][n];
		
		for(int i = 0; i < 2; i++)
			for(int j = 0; j < n; j++)
				x[i][j] = scan.nextInt();
		
		scan.close();
		
		int sum;
		int max = 0;
		

		for(int i = 0; i < n; i++){
			sum = 0;
			for(int j = 0; j <= i; j++){
				sum += x[0][j];
			}
			for(int j = i; j < n; j++){
				sum += x[1][j];
			}
			if(sum >= max)max =sum;
		}	
		System.out.print(max);
	}
} Main public static void main(String args[]){

		Scanner scan = new Scanner(System.in);
		int n;
		n = scan.nextInt();
		int x[][] = new int[2][n];
		
		for(int i = 0; i < 2; i++)
			for(int j = 0; j < n; j++)
				x[i][j] = scan.nextInt();
		
		scan.close();
		
		int sum;
		int max = 0;
		

		for(int i = 0; i < n; i++){
			sum = 0;
			for(int j = 0; j <= i; j++){
				sum += x[0][j];
			}
			for(int j = i; j < n; j++){
				sum += x[1][j];
			}
			if(sum >= max)max =sum;
		}	
		System.out.print(max);
	} main {

		Scanner scan = new Scanner(System.in);
		int n;
		n = scan.nextInt();
		int x[][] = new int[2][n];
		
		for(int i = 0; i < 2; i++)
			for(int j = 0; j < n; j++)
				x[i][j] = scan.nextInt();
		
		scan.close();
		
		int sum;
		int max = 0;
		

		for(int i = 0; i < n; i++){
			sum = 0;
			for(int j = 0; j <= i; j++){
				sum += x[0][j];
			}
			for(int j = i; j < n; j++){
				sum += x[1][j];
			}
			if(sum >= max)max =sum;
		}	
		System.out.print(max);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n; n n = scan.nextInt() n scan.nextInt() scan.nextInt scan int x[][] = new int[2][n]; x new int[2][n] 2 n for(int i = 0; i < 2; i++)
			for(int j = 0; j < n; j++)
				x[i][j] = scan.nextInt(); int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i for(int j = 0; j < n; j++)
				x[i][j] = scan.nextInt(); for(int j = 0; j < n; j++)
				x[i][j] = scan.nextInt(); int j = 0; int j = 0; j 0 j < n j n j++ j++ j x[i][j] = scan.nextInt(); x[i][j] = scan.nextInt() x[i][j] x[i] x i j scan.nextInt() scan.nextInt scan scan.close() scan.close scan int sum; sum int max = 0; max 0 for(int i = 0; i < n; i++){
			sum = 0;
			for(int j = 0; j <= i; j++){
				sum += x[0][j];
			}
			for(int j = i; j < n; j++){
				sum += x[1][j];
			}
			if(sum >= max)max =sum;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			sum = 0;
			for(int j = 0; j <= i; j++){
				sum += x[0][j];
			}
			for(int j = i; j < n; j++){
				sum += x[1][j];
			}
			if(sum >= max)max =sum;
		} {
			sum = 0;
			for(int j = 0; j <= i; j++){
				sum += x[0][j];
			}
			for(int j = i; j < n; j++){
				sum += x[1][j];
			}
			if(sum >= max)max =sum;
		} sum = 0 sum 0 for(int j = 0; j <= i; j++){
				sum += x[0][j];
			} int j = 0; int j = 0; j 0 j <= i j i j++ j++ j {
				sum += x[0][j];
			} {
				sum += x[0][j];
			} sum += x[0][j] sum x[0][j] x[0] x 0 j for(int j = i; j < n; j++){
				sum += x[1][j];
			} int j = i; int j = i; j i j < n j n j++ j++ j {
				sum += x[1][j];
			} {
				sum += x[1][j];
			} sum += x[1][j] sum x[1][j] x[1] x 1 j if(sum >= max)max =sum; sum >= max sum max max =sum max sum System.out.print(max) System.out.print System.out System System.out max String args[] args
import java.util.Scanner;

class Main {

	public static void main(String args[]){

		Scanner scan = new Scanner(System.in);
		int n;
		n = scan.nextInt();
		int x[][] = new int[2][n];
		
		for(int i = 0; i < 2; i++)
			for(int j = 0; j < n; j++)
				x[i][j] = scan.nextInt();
		
		scan.close();
		
		int sum;
		int max = 0;
		

		for(int i = 0; i < n; i++){
			sum = 0;
			for(int j = 0; j <= i; j++){
				sum += x[0][j];
			}
			for(int j = i; j < n; j++){
				sum += x[1][j];
			}
			if(sum >= max)max =sum;
		}	
		System.out.print(max);
	}
}