import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt();
		
		int[][] a = new int[2][n];
		
		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < n; j++) {
				a[i][j] = stdIn.nextInt();
				
			}
		}
		
		int  ans = 0;
		int base = 0;
		
		for(int i = 0; i < n; i++){
			int max = 0;
			base += a[0][i];
			
			max = base;
			
			for(int j = i; j < n; j++) {
				max += a[1][j];
				
			}
			
			ans = Math.max(ans,max);
			
		}
		System.out.println(ans);
		
	}

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

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt();
		
		int[][] a = new int[2][n];
		
		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < n; j++) {
				a[i][j] = stdIn.nextInt();
				
			}
		}
		
		int  ans = 0;
		int base = 0;
		
		for(int i = 0; i < n; i++){
			int max = 0;
			base += a[0][i];
			
			max = base;
			
			for(int j = i; j < n; j++) {
				max += a[1][j];
				
			}
			
			ans = Math.max(ans,max);
			
		}
		System.out.println(ans);
		
	}

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

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt();
		
		int[][] a = new int[2][n];
		
		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < n; j++) {
				a[i][j] = stdIn.nextInt();
				
			}
		}
		
		int  ans = 0;
		int base = 0;
		
		for(int i = 0; i < n; i++){
			int max = 0;
			base += a[0][i];
			
			max = base;
			
			for(int j = i; j < n; j++) {
				max += a[1][j];
				
			}
			
			ans = Math.max(ans,max);
			
		}
		System.out.println(ans);
		
	}

} public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt();
		
		int[][] a = new int[2][n];
		
		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < n; j++) {
				a[i][j] = stdIn.nextInt();
				
			}
		}
		
		int  ans = 0;
		int base = 0;
		
		for(int i = 0; i < n; i++){
			int max = 0;
			base += a[0][i];
			
			max = base;
			
			for(int j = i; j < n; j++) {
				max += a[1][j];
				
			}
			
			ans = Math.max(ans,max);
			
		}
		System.out.println(ans);
		
	}

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

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt();
		
		int[][] a = new int[2][n];
		
		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < n; j++) {
				a[i][j] = stdIn.nextInt();
				
			}
		}
		
		int  ans = 0;
		int base = 0;
		
		for(int i = 0; i < n; i++){
			int max = 0;
			base += a[0][i];
			
			max = base;
			
			for(int j = i; j < n; j++) {
				max += a[1][j];
				
			}
			
			ans = Math.max(ans,max);
			
		}
		System.out.println(ans);
		
	}

}
