
import java.util.Scanner;

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

import java.util.Scanner;

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

