import java.util.Scanner;

public class Main{

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

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

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

} Main public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int N = scn.nextInt();
		int[] A1 = new int[N+1], A2 = new int[N+1];
		for(int i = 1;i < N+1;i++) {
			A1[i] = A1[i-1] + scn.nextInt();
		}
		for(int i = 1;i < N+1;i++) {
			A2[i] = A2[i-1] + scn.nextInt();
		}
		int ans = 0;
		for(int i = 0;i < N;i++) {
			ans = Math.max(ans, A1[i+1] - A1[0] + A2[N] - A2[i]);
		}
		System.out.println(ans);
	} main {
		Scanner scn = new Scanner(System.in);
		int N = scn.nextInt();
		int[] A1 = new int[N+1], A2 = new int[N+1];
		for(int i = 1;i < N+1;i++) {
			A1[i] = A1[i-1] + scn.nextInt();
		}
		for(int i = 1;i < N+1;i++) {
			A2[i] = A2[i-1] + scn.nextInt();
		}
		int ans = 0;
		for(int i = 0;i < N;i++) {
			ans = Math.max(ans, A1[i+1] - A1[0] + A2[N] - A2[i]);
		}
		System.out.println(ans);
	} Scanner scn = new Scanner(System.in); scn new Scanner(System.in) int N = scn.nextInt(); N scn.nextInt() scn.nextInt scn int[] A1 = new int[N+1] A1 new int[N+1] N+1 N 1 A2 = new int[N+1]; A2 new int[N+1] N+1 N 1 for(int i = 1;i < N+1;i++) {
			A1[i] = A1[i-1] + scn.nextInt();
		} int i = 1; int i = 1; i 1 i < N+1 i N+1 N 1 i++ i++ i {
			A1[i] = A1[i-1] + scn.nextInt();
		} {
			A1[i] = A1[i-1] + scn.nextInt();
		} A1[i] = A1[i-1] + scn.nextInt() A1[i] A1 i A1[i-1] + scn.nextInt() A1[i-1] A1 i-1 i 1 scn.nextInt() scn.nextInt scn for(int i = 1;i < N+1;i++) {
			A2[i] = A2[i-1] + scn.nextInt();
		} int i = 1; int i = 1; i 1 i < N+1 i N+1 N 1 i++ i++ i {
			A2[i] = A2[i-1] + scn.nextInt();
		} {
			A2[i] = A2[i-1] + scn.nextInt();
		} A2[i] = A2[i-1] + scn.nextInt() A2[i] A2 i A2[i-1] + scn.nextInt() A2[i-1] A2 i-1 i 1 scn.nextInt() scn.nextInt scn int ans = 0; ans 0 for(int i = 0;i < N;i++) {
			ans = Math.max(ans, A1[i+1] - A1[0] + A2[N] - A2[i]);
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			ans = Math.max(ans, A1[i+1] - A1[0] + A2[N] - A2[i]);
		} {
			ans = Math.max(ans, A1[i+1] - A1[0] + A2[N] - A2[i]);
		} ans = Math.max(ans, A1[i+1] - A1[0] + A2[N] - A2[i]) ans Math.max(ans, A1[i+1] - A1[0] + A2[N] - A2[i]) Math.max Math ans A1[i+1] - A1[0] + A2[N] - A2[i] A1[i+1] - A1[0] + A2[N] A1[i+1] - A1[0] A1[i+1] A1 i+1 i 1 A1[0] A1 0 A2[N] A2 N A2[i] 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 scn = new Scanner(System.in);
		int N = scn.nextInt();
		int[] A1 = new int[N+1], A2 = new int[N+1];
		for(int i = 1;i < N+1;i++) {
			A1[i] = A1[i-1] + scn.nextInt();
		}
		for(int i = 1;i < N+1;i++) {
			A2[i] = A2[i-1] + scn.nextInt();
		}
		int ans = 0;
		for(int i = 0;i < N;i++) {
			ans = Math.max(ans, A1[i+1] - A1[0] + A2[N] - A2[i]);
		}
		System.out.println(ans);
	}

} public class Main{

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

} Main
import java.util.Scanner;

public class Main{

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

}
