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 A1 = sc.nextLine();
		String A2 = sc.nextLine();
		sc.close();
		int max = 0;
		
		int[][] A = new int[2][N];
		
		for(int j = 0; j < N; j++) {
			String[] s1 = A1.split(" ");
			String[] s2 = A2.split(" ");
			A[0][j] = Integer.valueOf(s1[j]);
			A[1][j] = Integer.valueOf(s2[j]);
		}
		
		for(int j = 0; j < N; j++) {
			max = Math.max(max, candies(j, A));
		}
		System.out.println(max);
	}
	
	public static int candies(int down,int A[][]) {
		int count = 0;
		for(int i = 0; i <= down; i++) {
			count += A[0][i];
		}
		for(int i = down; i < A[0].length; i++) {
			count += A[1][i];
		}
		return count;
	}
} 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 A1 = sc.nextLine();
		String A2 = sc.nextLine();
		sc.close();
		int max = 0;
		
		int[][] A = new int[2][N];
		
		for(int j = 0; j < N; j++) {
			String[] s1 = A1.split(" ");
			String[] s2 = A2.split(" ");
			A[0][j] = Integer.valueOf(s1[j]);
			A[1][j] = Integer.valueOf(s2[j]);
		}
		
		for(int j = 0; j < N; j++) {
			max = Math.max(max, candies(j, A));
		}
		System.out.println(max);
	}
	
	public static int candies(int down,int A[][]) {
		int count = 0;
		for(int i = 0; i <= down; i++) {
			count += A[0][i];
		}
		for(int i = down; i < A[0].length; i++) {
			count += A[1][i];
		}
		return count;
	}
} Main public static void main(String arg[]) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		sc.nextLine();
		String A1 = sc.nextLine();
		String A2 = sc.nextLine();
		sc.close();
		int max = 0;
		
		int[][] A = new int[2][N];
		
		for(int j = 0; j < N; j++) {
			String[] s1 = A1.split(" ");
			String[] s2 = A2.split(" ");
			A[0][j] = Integer.valueOf(s1[j]);
			A[1][j] = Integer.valueOf(s2[j]);
		}
		
		for(int j = 0; j < N; j++) {
			max = Math.max(max, candies(j, A));
		}
		System.out.println(max);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		sc.nextLine();
		String A1 = sc.nextLine();
		String A2 = sc.nextLine();
		sc.close();
		int max = 0;
		
		int[][] A = new int[2][N];
		
		for(int j = 0; j < N; j++) {
			String[] s1 = A1.split(" ");
			String[] s2 = A2.split(" ");
			A[0][j] = Integer.valueOf(s1[j]);
			A[1][j] = Integer.valueOf(s2[j]);
		}
		
		for(int j = 0; j < N; j++) {
			max = Math.max(max, candies(j, A));
		}
		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 A1 = sc.nextLine(); A1 sc.nextLine() sc.nextLine sc String A2 = sc.nextLine(); A2 sc.nextLine() sc.nextLine sc sc.close() sc.close sc int max = 0; max 0 int[][] A = new int[2][N]; A new int[2][N] 2 N for(int j = 0; j < N; j++) {
			String[] s1 = A1.split(" ");
			String[] s2 = A2.split(" ");
			A[0][j] = Integer.valueOf(s1[j]);
			A[1][j] = Integer.valueOf(s2[j]);
		} int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
			String[] s1 = A1.split(" ");
			String[] s2 = A2.split(" ");
			A[0][j] = Integer.valueOf(s1[j]);
			A[1][j] = Integer.valueOf(s2[j]);
		} {
			String[] s1 = A1.split(" ");
			String[] s2 = A2.split(" ");
			A[0][j] = Integer.valueOf(s1[j]);
			A[1][j] = Integer.valueOf(s2[j]);
		} String[] s1 = A1.split(" "); s1 A1.split(" ") A1.split A1 " " String[] s2 = A2.split(" "); s2 A2.split(" ") A2.split A2 " " A[0][j] = Integer.valueOf(s1[j]) A[0][j] A[0] A 0 j Integer.valueOf(s1[j]) Integer.valueOf Integer s1[j] s1 j A[1][j] = Integer.valueOf(s2[j]) A[1][j] A[1] A 1 j Integer.valueOf(s2[j]) Integer.valueOf Integer s2[j] s2 j for(int j = 0; j < N; j++) {
			max = Math.max(max, candies(j, A));
		} int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
			max = Math.max(max, candies(j, A));
		} {
			max = Math.max(max, candies(j, A));
		} max = Math.max(max, candies(j, A)) max Math.max(max, candies(j, A)) Math.max Math max candies(j, A) candies j A System.out.println(max) System.out.println System.out System System.out max String arg[] arg public static int candies(int down,int A[][]) {
		int count = 0;
		for(int i = 0; i <= down; i++) {
			count += A[0][i];
		}
		for(int i = down; i < A[0].length; i++) {
			count += A[1][i];
		}
		return count;
	} candies {
		int count = 0;
		for(int i = 0; i <= down; i++) {
			count += A[0][i];
		}
		for(int i = down; i < A[0].length; i++) {
			count += A[1][i];
		}
		return count;
	} int count = 0; count 0 for(int i = 0; i <= down; i++) {
			count += A[0][i];
		} int i = 0; int i = 0; i 0 i <= down i down i++ i++ i {
			count += A[0][i];
		} {
			count += A[0][i];
		} count += A[0][i] count A[0][i] A[0] A 0 i for(int i = down; i < A[0].length; i++) {
			count += A[1][i];
		} int i = down; int i = down; i down i < A[0].length i A[0].length A[0] A 0 A[0].length i++ i++ i {
			count += A[1][i];
		} {
			count += A[1][i];
		} count += A[1][i] count A[1][i] A[1] A 1 i return count; count int down down int A[][] A
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 A1 = sc.nextLine();
		String A2 = sc.nextLine();
		sc.close();
		int max = 0;
		
		int[][] A = new int[2][N];
		
		for(int j = 0; j < N; j++) {
			String[] s1 = A1.split(" ");
			String[] s2 = A2.split(" ");
			A[0][j] = Integer.valueOf(s1[j]);
			A[1][j] = Integer.valueOf(s2[j]);
		}
		
		for(int j = 0; j < N; j++) {
			max = Math.max(max, candies(j, A));
		}
		System.out.println(max);
	}
	
	public static int candies(int down,int A[][]) {
		int count = 0;
		for(int i = 0; i <= down; i++) {
			count += A[0][i];
		}
		for(int i = down; i < A[0].length; i++) {
			count += A[1][i];
		}
		return count;
	}
}