import java.util.*;

public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int A1[] = new int[N];
		int A2[] = new int[N];
		for(int i = 0; i < N; i++) {
			A1[i] = sc.nextInt();
		}
		for(int i = 0; i < N; i++) {
			A2[i] = sc.nextInt();
		}
		
		int sum_A1[] = new int[N];
		int sum_A2[] = new int[N];
		sum_A1[0] = A1[0];
		for(int i = 1; i < N; i++) {
			sum_A1[i] = sum_A1[i - 1] + A1[i];
		}
		sum_A2[N - 1] = A2[N - 1];
		for(int i = N - 2; i >= 0; i--) {
			sum_A2[i] = sum_A2[i + 1] + A2[i];
		}
		
		int ans = 0;
		for(int i = 0; i < N; i++) {
			ans = Math.max(ans, sum_A1[i] + sum_A2[i]);
		}
		System.out.println(ans);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int A1[] = new int[N];
		int A2[] = new int[N];
		for(int i = 0; i < N; i++) {
			A1[i] = sc.nextInt();
		}
		for(int i = 0; i < N; i++) {
			A2[i] = sc.nextInt();
		}
		
		int sum_A1[] = new int[N];
		int sum_A2[] = new int[N];
		sum_A1[0] = A1[0];
		for(int i = 1; i < N; i++) {
			sum_A1[i] = sum_A1[i - 1] + A1[i];
		}
		sum_A2[N - 1] = A2[N - 1];
		for(int i = N - 2; i >= 0; i--) {
			sum_A2[i] = sum_A2[i + 1] + A2[i];
		}
		
		int ans = 0;
		for(int i = 0; i < N; i++) {
			ans = Math.max(ans, sum_A1[i] + sum_A2[i]);
		}
		System.out.println(ans);
	}
} Main public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int A1[] = new int[N];
		int A2[] = new int[N];
		for(int i = 0; i < N; i++) {
			A1[i] = sc.nextInt();
		}
		for(int i = 0; i < N; i++) {
			A2[i] = sc.nextInt();
		}
		
		int sum_A1[] = new int[N];
		int sum_A2[] = new int[N];
		sum_A1[0] = A1[0];
		for(int i = 1; i < N; i++) {
			sum_A1[i] = sum_A1[i - 1] + A1[i];
		}
		sum_A2[N - 1] = A2[N - 1];
		for(int i = N - 2; i >= 0; i--) {
			sum_A2[i] = sum_A2[i + 1] + A2[i];
		}
		
		int ans = 0;
		for(int i = 0; i < N; i++) {
			ans = Math.max(ans, sum_A1[i] + sum_A2[i]);
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int A1[] = new int[N];
		int A2[] = new int[N];
		for(int i = 0; i < N; i++) {
			A1[i] = sc.nextInt();
		}
		for(int i = 0; i < N; i++) {
			A2[i] = sc.nextInt();
		}
		
		int sum_A1[] = new int[N];
		int sum_A2[] = new int[N];
		sum_A1[0] = A1[0];
		for(int i = 1; i < N; i++) {
			sum_A1[i] = sum_A1[i - 1] + A1[i];
		}
		sum_A2[N - 1] = A2[N - 1];
		for(int i = N - 2; i >= 0; i--) {
			sum_A2[i] = sum_A2[i + 1] + A2[i];
		}
		
		int ans = 0;
		for(int i = 0; i < N; i++) {
			ans = Math.max(ans, sum_A1[i] + sum_A2[i]);
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int A1[] = new int[N]; A1 new int[N] N int A2[] = new int[N]; A2 new int[N] N for(int i = 0; i < N; i++) {
			A1[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			A1[i] = sc.nextInt();
		} {
			A1[i] = sc.nextInt();
		} A1[i] = sc.nextInt() A1[i] A1 i sc.nextInt() sc.nextInt sc for(int i = 0; i < N; i++) {
			A2[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			A2[i] = sc.nextInt();
		} {
			A2[i] = sc.nextInt();
		} A2[i] = sc.nextInt() A2[i] A2 i sc.nextInt() sc.nextInt sc int sum_A1[] = new int[N]; sum_A1 new int[N] N int sum_A2[] = new int[N]; sum_A2 new int[N] N sum_A1[0] = A1[0] sum_A1[0] sum_A1 0 A1[0] A1 0 for(int i = 1; i < N; i++) {
			sum_A1[i] = sum_A1[i - 1] + A1[i];
		} int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
			sum_A1[i] = sum_A1[i - 1] + A1[i];
		} {
			sum_A1[i] = sum_A1[i - 1] + A1[i];
		} sum_A1[i] = sum_A1[i - 1] + A1[i] sum_A1[i] sum_A1 i sum_A1[i - 1] + A1[i] sum_A1[i - 1] sum_A1 i - 1 i 1 A1[i] A1 i sum_A2[N - 1] = A2[N - 1] sum_A2[N - 1] sum_A2 N - 1 N 1 A2[N - 1] A2 N - 1 N 1 for(int i = N - 2; i >= 0; i--) {
			sum_A2[i] = sum_A2[i + 1] + A2[i];
		} int i = N - 2; int i = N - 2; i N - 2 N 2 i >= 0 i 0 i-- i-- i {
			sum_A2[i] = sum_A2[i + 1] + A2[i];
		} {
			sum_A2[i] = sum_A2[i + 1] + A2[i];
		} sum_A2[i] = sum_A2[i + 1] + A2[i] sum_A2[i] sum_A2 i sum_A2[i + 1] + A2[i] sum_A2[i + 1] sum_A2 i + 1 i 1 A2[i] A2 i int ans = 0; ans 0 for(int i = 0; i < N; i++) {
			ans = Math.max(ans, sum_A1[i] + sum_A2[i]);
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			ans = Math.max(ans, sum_A1[i] + sum_A2[i]);
		} {
			ans = Math.max(ans, sum_A1[i] + sum_A2[i]);
		} ans = Math.max(ans, sum_A1[i] + sum_A2[i]) ans Math.max(ans, sum_A1[i] + sum_A2[i]) Math.max Math ans sum_A1[i] + sum_A2[i] sum_A1[i] sum_A1 i sum_A2[i] sum_A2 i System.out.println(ans) System.out.println System.out System System.out ans String args[] args public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int A1[] = new int[N];
		int A2[] = new int[N];
		for(int i = 0; i < N; i++) {
			A1[i] = sc.nextInt();
		}
		for(int i = 0; i < N; i++) {
			A2[i] = sc.nextInt();
		}
		
		int sum_A1[] = new int[N];
		int sum_A2[] = new int[N];
		sum_A1[0] = A1[0];
		for(int i = 1; i < N; i++) {
			sum_A1[i] = sum_A1[i - 1] + A1[i];
		}
		sum_A2[N - 1] = A2[N - 1];
		for(int i = N - 2; i >= 0; i--) {
			sum_A2[i] = sum_A2[i + 1] + A2[i];
		}
		
		int ans = 0;
		for(int i = 0; i < N; i++) {
			ans = Math.max(ans, sum_A1[i] + sum_A2[i]);
		}
		System.out.println(ans);
	}
} public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int A1[] = new int[N];
		int A2[] = new int[N];
		for(int i = 0; i < N; i++) {
			A1[i] = sc.nextInt();
		}
		for(int i = 0; i < N; i++) {
			A2[i] = sc.nextInt();
		}
		
		int sum_A1[] = new int[N];
		int sum_A2[] = new int[N];
		sum_A1[0] = A1[0];
		for(int i = 1; i < N; i++) {
			sum_A1[i] = sum_A1[i - 1] + A1[i];
		}
		sum_A2[N - 1] = A2[N - 1];
		for(int i = N - 2; i >= 0; i--) {
			sum_A2[i] = sum_A2[i + 1] + A2[i];
		}
		
		int ans = 0;
		for(int i = 0; i < N; i++) {
			ans = Math.max(ans, sum_A1[i] + sum_A2[i]);
		}
		System.out.println(ans);
	}
} Main
import java.util.*;

public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int A1[] = new int[N];
		int A2[] = new int[N];
		for(int i = 0; i < N; i++) {
			A1[i] = sc.nextInt();
		}
		for(int i = 0; i < N; i++) {
			A2[i] = sc.nextInt();
		}
		
		int sum_A1[] = new int[N];
		int sum_A2[] = new int[N];
		sum_A1[0] = A1[0];
		for(int i = 1; i < N; i++) {
			sum_A1[i] = sum_A1[i - 1] + A1[i];
		}
		sum_A2[N - 1] = A2[N - 1];
		for(int i = N - 2; i >= 0; i--) {
			sum_A2[i] = sum_A2[i + 1] + A2[i];
		}
		
		int ans = 0;
		for(int i = 0; i < N; i++) {
			ans = Math.max(ans, sum_A1[i] + sum_A2[i]);
		}
		System.out.println(ans);
	}
}
