import java.util.Scanner;

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();
		}

		int suma2 = 0;
		for(int i=0;i<N;i++) {
			a2[i] = sc.nextInt();
			suma2 += a2[i];
		}

		int suma1 = a1[0];
		int maxsum = suma1 + suma2;
		for(int i=1;i<N;i++) {
			suma1 += a1[i];
			suma2 -= a2[i-1];
			if(maxsum < (suma1 + suma2)) {
				maxsum = (suma1 + suma2);
			}
		}
		System.out.println(maxsum);
	}

} import java.util.Scanner; Scanner 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();
		}

		int suma2 = 0;
		for(int i=0;i<N;i++) {
			a2[i] = sc.nextInt();
			suma2 += a2[i];
		}

		int suma1 = a1[0];
		int maxsum = suma1 + suma2;
		for(int i=1;i<N;i++) {
			suma1 += a1[i];
			suma2 -= a2[i-1];
			if(maxsum < (suma1 + suma2)) {
				maxsum = (suma1 + suma2);
			}
		}
		System.out.println(maxsum);
	}

} 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();
		}

		int suma2 = 0;
		for(int i=0;i<N;i++) {
			a2[i] = sc.nextInt();
			suma2 += a2[i];
		}

		int suma1 = a1[0];
		int maxsum = suma1 + suma2;
		for(int i=1;i<N;i++) {
			suma1 += a1[i];
			suma2 -= a2[i-1];
			if(maxsum < (suma1 + suma2)) {
				maxsum = (suma1 + suma2);
			}
		}
		System.out.println(maxsum);
	} 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();
		}

		int suma2 = 0;
		for(int i=0;i<N;i++) {
			a2[i] = sc.nextInt();
			suma2 += a2[i];
		}

		int suma1 = a1[0];
		int maxsum = suma1 + suma2;
		for(int i=1;i<N;i++) {
			suma1 += a1[i];
			suma2 -= a2[i-1];
			if(maxsum < (suma1 + suma2)) {
				maxsum = (suma1 + suma2);
			}
		}
		System.out.println(maxsum);
	} 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 int suma2 = 0; suma2 0 for(int i=0;i<N;i++) {
			a2[i] = sc.nextInt();
			suma2 += a2[i];
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			a2[i] = sc.nextInt();
			suma2 += a2[i];
		} {
			a2[i] = sc.nextInt();
			suma2 += a2[i];
		} a2[i] = sc.nextInt() a2[i] a2 i sc.nextInt() sc.nextInt sc suma2 += a2[i] suma2 a2[i] a2 i int suma1 = a1[0]; suma1 a1[0] a1 0 int maxsum = suma1 + suma2; maxsum suma1 + suma2 suma1 suma2 for(int i=1;i<N;i++) {
			suma1 += a1[i];
			suma2 -= a2[i-1];
			if(maxsum < (suma1 + suma2)) {
				maxsum = (suma1 + suma2);
			}
		} int i=1; int i=1; i 1 i<N i N i++ i++ i {
			suma1 += a1[i];
			suma2 -= a2[i-1];
			if(maxsum < (suma1 + suma2)) {
				maxsum = (suma1 + suma2);
			}
		} {
			suma1 += a1[i];
			suma2 -= a2[i-1];
			if(maxsum < (suma1 + suma2)) {
				maxsum = (suma1 + suma2);
			}
		} suma1 += a1[i] suma1 a1[i] a1 i suma2 -= a2[i-1] suma2 a2[i-1] a2 i-1 i 1 if(maxsum < (suma1 + suma2)) {
				maxsum = (suma1 + suma2);
			} maxsum < (suma1 + suma2) maxsum (suma1 + suma2) suma1 suma2 {
				maxsum = (suma1 + suma2);
			} maxsum = (suma1 + suma2) maxsum (suma1 + suma2) suma1 suma2 System.out.println(maxsum) System.out.println System.out System System.out maxsum 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();
		}

		int suma2 = 0;
		for(int i=0;i<N;i++) {
			a2[i] = sc.nextInt();
			suma2 += a2[i];
		}

		int suma1 = a1[0];
		int maxsum = suma1 + suma2;
		for(int i=1;i<N;i++) {
			suma1 += a1[i];
			suma2 -= a2[i-1];
			if(maxsum < (suma1 + suma2)) {
				maxsum = (suma1 + suma2);
			}
		}
		System.out.println(maxsum);
	}

} 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();
		}

		int suma2 = 0;
		for(int i=0;i<N;i++) {
			a2[i] = sc.nextInt();
			suma2 += a2[i];
		}

		int suma1 = a1[0];
		int maxsum = suma1 + suma2;
		for(int i=1;i<N;i++) {
			suma1 += a1[i];
			suma2 -= a2[i-1];
			if(maxsum < (suma1 + suma2)) {
				maxsum = (suma1 + suma2);
			}
		}
		System.out.println(maxsum);
	}

} Main
import java.util.Scanner;

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();
		}

		int suma2 = 0;
		for(int i=0;i<N;i++) {
			a2[i] = sc.nextInt();
			suma2 += a2[i];
		}

		int suma1 = a1[0];
		int maxsum = suma1 + suma2;
		for(int i=1;i<N;i++) {
			suma1 += a1[i];
			suma2 -= a2[i-1];
			if(maxsum < (suma1 + suma2)) {
				maxsum = (suma1 + suma2);
			}
		}
		System.out.println(maxsum);
	}

}
