import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] data = new int[2][N];
		
		for(int i = 0; i < data.length; i++) {
			for(int j = 0; j < data[i].length; j++) {
				data[i][j] = sc.nextInt();
			}
		}
		
		int max = 0;
		
		for(int i = 0; i < N; i++) {
			int cnt = 0;
			for(int j = 0; j <= i; j++) {
				cnt += data[0][j];
			}
			for(int j = i; j < N; j++) {
				cnt += data[1][j];
			}
			if(max < cnt) max = cnt;
		}
		
		System.out.println(max);
		
		sc.close();

	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] data = new int[2][N];
		
		for(int i = 0; i < data.length; i++) {
			for(int j = 0; j < data[i].length; j++) {
				data[i][j] = sc.nextInt();
			}
		}
		
		int max = 0;
		
		for(int i = 0; i < N; i++) {
			int cnt = 0;
			for(int j = 0; j <= i; j++) {
				cnt += data[0][j];
			}
			for(int j = i; j < N; j++) {
				cnt += data[1][j];
			}
			if(max < cnt) max = cnt;
		}
		
		System.out.println(max);
		
		sc.close();

	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] data = new int[2][N];
		
		for(int i = 0; i < data.length; i++) {
			for(int j = 0; j < data[i].length; j++) {
				data[i][j] = sc.nextInt();
			}
		}
		
		int max = 0;
		
		for(int i = 0; i < N; i++) {
			int cnt = 0;
			for(int j = 0; j <= i; j++) {
				cnt += data[0][j];
			}
			for(int j = i; j < N; j++) {
				cnt += data[1][j];
			}
			if(max < cnt) max = cnt;
		}
		
		System.out.println(max);
		
		sc.close();

	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] data = new int[2][N];
		
		for(int i = 0; i < data.length; i++) {
			for(int j = 0; j < data[i].length; j++) {
				data[i][j] = sc.nextInt();
			}
		}
		
		int max = 0;
		
		for(int i = 0; i < N; i++) {
			int cnt = 0;
			for(int j = 0; j <= i; j++) {
				cnt += data[0][j];
			}
			for(int j = i; j < N; j++) {
				cnt += data[1][j];
			}
			if(max < cnt) max = cnt;
		}
		
		System.out.println(max);
		
		sc.close();

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[][] data = new int[2][N]; data new int[2][N] 2 N for(int i = 0; i < data.length; i++) {
			for(int j = 0; j < data[i].length; j++) {
				data[i][j] = sc.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < data.length i data.length data data.length i++ i++ i {
			for(int j = 0; j < data[i].length; j++) {
				data[i][j] = sc.nextInt();
			}
		} {
			for(int j = 0; j < data[i].length; j++) {
				data[i][j] = sc.nextInt();
			}
		} for(int j = 0; j < data[i].length; j++) {
				data[i][j] = sc.nextInt();
			} int j = 0; int j = 0; j 0 j < data[i].length j data[i].length data[i] data i data[i].length j++ j++ j {
				data[i][j] = sc.nextInt();
			} {
				data[i][j] = sc.nextInt();
			} data[i][j] = sc.nextInt() data[i][j] data[i] data i j sc.nextInt() sc.nextInt sc int max = 0; max 0 for(int i = 0; i < N; i++) {
			int cnt = 0;
			for(int j = 0; j <= i; j++) {
				cnt += data[0][j];
			}
			for(int j = i; j < N; j++) {
				cnt += data[1][j];
			}
			if(max < cnt) max = cnt;
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			int cnt = 0;
			for(int j = 0; j <= i; j++) {
				cnt += data[0][j];
			}
			for(int j = i; j < N; j++) {
				cnt += data[1][j];
			}
			if(max < cnt) max = cnt;
		} {
			int cnt = 0;
			for(int j = 0; j <= i; j++) {
				cnt += data[0][j];
			}
			for(int j = i; j < N; j++) {
				cnt += data[1][j];
			}
			if(max < cnt) max = cnt;
		} int cnt = 0; cnt 0 for(int j = 0; j <= i; j++) {
				cnt += data[0][j];
			} int j = 0; int j = 0; j 0 j <= i j i j++ j++ j {
				cnt += data[0][j];
			} {
				cnt += data[0][j];
			} cnt += data[0][j] cnt data[0][j] data[0] data 0 j for(int j = i; j < N; j++) {
				cnt += data[1][j];
			} int j = i; int j = i; j i j < N j N j++ j++ j {
				cnt += data[1][j];
			} {
				cnt += data[1][j];
			} cnt += data[1][j] cnt data[1][j] data[1] data 1 j if(max < cnt) max = cnt; max < cnt max cnt max = cnt max cnt System.out.println(max) System.out.println System.out System System.out max sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] data = new int[2][N];
		
		for(int i = 0; i < data.length; i++) {
			for(int j = 0; j < data[i].length; j++) {
				data[i][j] = sc.nextInt();
			}
		}
		
		int max = 0;
		
		for(int i = 0; i < N; i++) {
			int cnt = 0;
			for(int j = 0; j <= i; j++) {
				cnt += data[0][j];
			}
			for(int j = i; j < N; j++) {
				cnt += data[1][j];
			}
			if(max < cnt) max = cnt;
		}
		
		System.out.println(max);
		
		sc.close();

	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] data = new int[2][N];
		
		for(int i = 0; i < data.length; i++) {
			for(int j = 0; j < data[i].length; j++) {
				data[i][j] = sc.nextInt();
			}
		}
		
		int max = 0;
		
		for(int i = 0; i < N; i++) {
			int cnt = 0;
			for(int j = 0; j <= i; j++) {
				cnt += data[0][j];
			}
			for(int j = i; j < N; j++) {
				cnt += data[1][j];
			}
			if(max < cnt) max = cnt;
		}
		
		System.out.println(max);
		
		sc.close();

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] data = new int[2][N];
		
		for(int i = 0; i < data.length; i++) {
			for(int j = 0; j < data[i].length; j++) {
				data[i][j] = sc.nextInt();
			}
		}
		
		int max = 0;
		
		for(int i = 0; i < N; i++) {
			int cnt = 0;
			for(int j = 0; j <= i; j++) {
				cnt += data[0][j];
			}
			for(int j = i; j < N; j++) {
				cnt += data[1][j];
			}
			if(max < cnt) max = cnt;
		}
		
		System.out.println(max);
		
		sc.close();

	}

}