import java.util.*;

public class Main {

	public static void main(String[] args) {

		Scanner keyboard = new Scanner(System.in);

		int N = keyboard.nextInt();
		int A1[] = new int[N];
		int A2[] = new int[N];
		
		int a1 = 0;
		for(int n1=0; n1<N; n1++) {
			a1 += keyboard.nextInt();
			A1[n1] = a1;
		}
		
		int a2sum = 0;
		for(int n2=0; n2<N; n2++) {
			A2[n2] = keyboard.nextInt();
			a2sum += A2[n2];
		}
		int ans = a2sum+A1[0];
		
		for(int n=1; n<N; n++) {
			a2sum -= A2[n-1];
			if(ans < A1[n]+ a2sum) {
				ans = A1[n]+ a2sum;
			}
		}
		
		System.out.println(ans);
		keyboard.close();
	}
} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {

		Scanner keyboard = new Scanner(System.in);

		int N = keyboard.nextInt();
		int A1[] = new int[N];
		int A2[] = new int[N];
		
		int a1 = 0;
		for(int n1=0; n1<N; n1++) {
			a1 += keyboard.nextInt();
			A1[n1] = a1;
		}
		
		int a2sum = 0;
		for(int n2=0; n2<N; n2++) {
			A2[n2] = keyboard.nextInt();
			a2sum += A2[n2];
		}
		int ans = a2sum+A1[0];
		
		for(int n=1; n<N; n++) {
			a2sum -= A2[n-1];
			if(ans < A1[n]+ a2sum) {
				ans = A1[n]+ a2sum;
			}
		}
		
		System.out.println(ans);
		keyboard.close();
	}
} Main public static void main(String[] args) {

		Scanner keyboard = new Scanner(System.in);

		int N = keyboard.nextInt();
		int A1[] = new int[N];
		int A2[] = new int[N];
		
		int a1 = 0;
		for(int n1=0; n1<N; n1++) {
			a1 += keyboard.nextInt();
			A1[n1] = a1;
		}
		
		int a2sum = 0;
		for(int n2=0; n2<N; n2++) {
			A2[n2] = keyboard.nextInt();
			a2sum += A2[n2];
		}
		int ans = a2sum+A1[0];
		
		for(int n=1; n<N; n++) {
			a2sum -= A2[n-1];
			if(ans < A1[n]+ a2sum) {
				ans = A1[n]+ a2sum;
			}
		}
		
		System.out.println(ans);
		keyboard.close();
	} main {

		Scanner keyboard = new Scanner(System.in);

		int N = keyboard.nextInt();
		int A1[] = new int[N];
		int A2[] = new int[N];
		
		int a1 = 0;
		for(int n1=0; n1<N; n1++) {
			a1 += keyboard.nextInt();
			A1[n1] = a1;
		}
		
		int a2sum = 0;
		for(int n2=0; n2<N; n2++) {
			A2[n2] = keyboard.nextInt();
			a2sum += A2[n2];
		}
		int ans = a2sum+A1[0];
		
		for(int n=1; n<N; n++) {
			a2sum -= A2[n-1];
			if(ans < A1[n]+ a2sum) {
				ans = A1[n]+ a2sum;
			}
		}
		
		System.out.println(ans);
		keyboard.close();
	} Scanner keyboard = new Scanner(System.in); keyboard new Scanner(System.in) int N = keyboard.nextInt(); N keyboard.nextInt() keyboard.nextInt keyboard int A1[] = new int[N]; A1 new int[N] N int A2[] = new int[N]; A2 new int[N] N int a1 = 0; a1 0 for(int n1=0; n1<N; n1++) {
			a1 += keyboard.nextInt();
			A1[n1] = a1;
		} int n1=0; int n1=0; n1 0 n1<N n1 N n1++ n1++ n1 {
			a1 += keyboard.nextInt();
			A1[n1] = a1;
		} {
			a1 += keyboard.nextInt();
			A1[n1] = a1;
		} a1 += keyboard.nextInt() a1 keyboard.nextInt() keyboard.nextInt keyboard A1[n1] = a1 A1[n1] A1 n1 a1 int a2sum = 0; a2sum 0 for(int n2=0; n2<N; n2++) {
			A2[n2] = keyboard.nextInt();
			a2sum += A2[n2];
		} int n2=0; int n2=0; n2 0 n2<N n2 N n2++ n2++ n2 {
			A2[n2] = keyboard.nextInt();
			a2sum += A2[n2];
		} {
			A2[n2] = keyboard.nextInt();
			a2sum += A2[n2];
		} A2[n2] = keyboard.nextInt() A2[n2] A2 n2 keyboard.nextInt() keyboard.nextInt keyboard a2sum += A2[n2] a2sum A2[n2] A2 n2 int ans = a2sum+A1[0]; ans a2sum+A1[0] a2sum A1[0] A1 0 for(int n=1; n<N; n++) {
			a2sum -= A2[n-1];
			if(ans < A1[n]+ a2sum) {
				ans = A1[n]+ a2sum;
			}
		} int n=1; int n=1; n 1 n<N n N n++ n++ n {
			a2sum -= A2[n-1];
			if(ans < A1[n]+ a2sum) {
				ans = A1[n]+ a2sum;
			}
		} {
			a2sum -= A2[n-1];
			if(ans < A1[n]+ a2sum) {
				ans = A1[n]+ a2sum;
			}
		} a2sum -= A2[n-1] a2sum A2[n-1] A2 n-1 n 1 if(ans < A1[n]+ a2sum) {
				ans = A1[n]+ a2sum;
			} ans < A1[n]+ a2sum ans A1[n]+ a2sum A1[n] A1 n a2sum {
				ans = A1[n]+ a2sum;
			} ans = A1[n]+ a2sum ans A1[n]+ a2sum A1[n] A1 n a2sum System.out.println(ans) System.out.println System.out System System.out ans keyboard.close() keyboard.close keyboard String[] args args public class Main {

	public static void main(String[] args) {

		Scanner keyboard = new Scanner(System.in);

		int N = keyboard.nextInt();
		int A1[] = new int[N];
		int A2[] = new int[N];
		
		int a1 = 0;
		for(int n1=0; n1<N; n1++) {
			a1 += keyboard.nextInt();
			A1[n1] = a1;
		}
		
		int a2sum = 0;
		for(int n2=0; n2<N; n2++) {
			A2[n2] = keyboard.nextInt();
			a2sum += A2[n2];
		}
		int ans = a2sum+A1[0];
		
		for(int n=1; n<N; n++) {
			a2sum -= A2[n-1];
			if(ans < A1[n]+ a2sum) {
				ans = A1[n]+ a2sum;
			}
		}
		
		System.out.println(ans);
		keyboard.close();
	}
} public class Main {

	public static void main(String[] args) {

		Scanner keyboard = new Scanner(System.in);

		int N = keyboard.nextInt();
		int A1[] = new int[N];
		int A2[] = new int[N];
		
		int a1 = 0;
		for(int n1=0; n1<N; n1++) {
			a1 += keyboard.nextInt();
			A1[n1] = a1;
		}
		
		int a2sum = 0;
		for(int n2=0; n2<N; n2++) {
			A2[n2] = keyboard.nextInt();
			a2sum += A2[n2];
		}
		int ans = a2sum+A1[0];
		
		for(int n=1; n<N; n++) {
			a2sum -= A2[n-1];
			if(ans < A1[n]+ a2sum) {
				ans = A1[n]+ a2sum;
			}
		}
		
		System.out.println(ans);
		keyboard.close();
	}
} Main
import java.util.*;

public class Main {

	public static void main(String[] args) {

		Scanner keyboard = new Scanner(System.in);

		int N = keyboard.nextInt();
		int A1[] = new int[N];
		int A2[] = new int[N];
		
		int a1 = 0;
		for(int n1=0; n1<N; n1++) {
			a1 += keyboard.nextInt();
			A1[n1] = a1;
		}
		
		int a2sum = 0;
		for(int n2=0; n2<N; n2++) {
			A2[n2] = keyboard.nextInt();
			a2sum += A2[n2];
		}
		int ans = a2sum+A1[0];
		
		for(int n=1; n<N; n++) {
			a2sum -= A2[n-1];
			if(ans < A1[n]+ a2sum) {
				ans = A1[n]+ a2sum;
			}
		}
		
		System.out.println(ans);
		keyboard.close();
	}
}
