
import java.util.Scanner;


public class Main {
	
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s = new Scanner(System.in);
		int N = s.nextInt();
		int[][] A = new int[2][N];
		for(int i = 0;i < 2;i++){
			for(int j = 0;j < N;j++){
				A[i][j] = s.nextInt();
			}
				
		}
		
		int max = 0;
		for(int i = 0;i < N;i++){
			int count = 0;
			for(int j = 0;j <= i;j++){
				count += A[0][j];
			}
			for(int j = i;j < N;j++){
				count += A[1][j];
			}
			max = Math.max(max, count);
		}
		
		System.out.println(max);
	}
	
} import java.util.Scanner; Scanner java.util public class Main {
	
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s = new Scanner(System.in);
		int N = s.nextInt();
		int[][] A = new int[2][N];
		for(int i = 0;i < 2;i++){
			for(int j = 0;j < N;j++){
				A[i][j] = s.nextInt();
			}
				
		}
		
		int max = 0;
		for(int i = 0;i < N;i++){
			int count = 0;
			for(int j = 0;j <= i;j++){
				count += A[0][j];
			}
			for(int j = i;j < N;j++){
				count += A[1][j];
			}
			max = Math.max(max, count);
		}
		
		System.out.println(max);
	}
	
} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s = new Scanner(System.in);
		int N = s.nextInt();
		int[][] A = new int[2][N];
		for(int i = 0;i < 2;i++){
			for(int j = 0;j < N;j++){
				A[i][j] = s.nextInt();
			}
				
		}
		
		int max = 0;
		for(int i = 0;i < N;i++){
			int count = 0;
			for(int j = 0;j <= i;j++){
				count += A[0][j];
			}
			for(int j = i;j < N;j++){
				count += A[1][j];
			}
			max = Math.max(max, count);
		}
		
		System.out.println(max);
	} main {
		// TODO Auto-generated method stub
		Scanner s = new Scanner(System.in);
		int N = s.nextInt();
		int[][] A = new int[2][N];
		for(int i = 0;i < 2;i++){
			for(int j = 0;j < N;j++){
				A[i][j] = s.nextInt();
			}
				
		}
		
		int max = 0;
		for(int i = 0;i < N;i++){
			int count = 0;
			for(int j = 0;j <= i;j++){
				count += A[0][j];
			}
			for(int j = i;j < N;j++){
				count += A[1][j];
			}
			max = Math.max(max, count);
		}
		
		System.out.println(max);
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int N = s.nextInt(); N s.nextInt() s.nextInt s 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] = s.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] = s.nextInt();
			}
				
		} {
			for(int j = 0;j < N;j++){
				A[i][j] = s.nextInt();
			}
				
		} for(int j = 0;j < N;j++){
				A[i][j] = s.nextInt();
			} int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
				A[i][j] = s.nextInt();
			} {
				A[i][j] = s.nextInt();
			} A[i][j] = s.nextInt() A[i][j] A[i] A i j s.nextInt() s.nextInt s int max = 0; max 0 for(int i = 0;i < N;i++){
			int count = 0;
			for(int j = 0;j <= i;j++){
				count += A[0][j];
			}
			for(int j = i;j < N;j++){
				count += A[1][j];
			}
			max = Math.max(max, count);
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			int count = 0;
			for(int j = 0;j <= i;j++){
				count += A[0][j];
			}
			for(int j = i;j < N;j++){
				count += A[1][j];
			}
			max = Math.max(max, count);
		} {
			int count = 0;
			for(int j = 0;j <= i;j++){
				count += A[0][j];
			}
			for(int j = i;j < N;j++){
				count += A[1][j];
			}
			max = Math.max(max, count);
		} int count = 0; count 0 for(int j = 0;j <= i;j++){
				count += A[0][j];
			} int j = 0; int j = 0; j 0 j <= i j i j++ j++ j {
				count += A[0][j];
			} {
				count += A[0][j];
			} count += A[0][j] count A[0][j] A[0] A 0 j for(int j = i;j < N;j++){
				count += A[1][j];
			} int j = i; int j = i; j i j < N j N j++ j++ j {
				count += A[1][j];
			} {
				count += A[1][j];
			} count += A[1][j] count A[1][j] A[1] A 1 j max = Math.max(max, count) max Math.max(max, count) Math.max Math max count System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {
	
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s = new Scanner(System.in);
		int N = s.nextInt();
		int[][] A = new int[2][N];
		for(int i = 0;i < 2;i++){
			for(int j = 0;j < N;j++){
				A[i][j] = s.nextInt();
			}
				
		}
		
		int max = 0;
		for(int i = 0;i < N;i++){
			int count = 0;
			for(int j = 0;j <= i;j++){
				count += A[0][j];
			}
			for(int j = i;j < N;j++){
				count += A[1][j];
			}
			max = Math.max(max, count);
		}
		
		System.out.println(max);
	}
	
} public class Main {
	
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s = new Scanner(System.in);
		int N = s.nextInt();
		int[][] A = new int[2][N];
		for(int i = 0;i < 2;i++){
			for(int j = 0;j < N;j++){
				A[i][j] = s.nextInt();
			}
				
		}
		
		int max = 0;
		for(int i = 0;i < N;i++){
			int count = 0;
			for(int j = 0;j <= i;j++){
				count += A[0][j];
			}
			for(int j = i;j < N;j++){
				count += A[1][j];
			}
			max = Math.max(max, count);
		}
		
		System.out.println(max);
	}
	
} Main

import java.util.Scanner;


public class Main {
	
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s = new Scanner(System.in);
		int N = s.nextInt();
		int[][] A = new int[2][N];
		for(int i = 0;i < 2;i++){
			for(int j = 0;j < N;j++){
				A[i][j] = s.nextInt();
			}
				
		}
		
		int max = 0;
		for(int i = 0;i < N;i++){
			int count = 0;
			for(int j = 0;j <= i;j++){
				count += A[0][j];
			}
			for(int j = i;j < N;j++){
				count += A[1][j];
			}
			max = Math.max(max, count);
		}
		
		System.out.println(max);
	}
	
}