import java.util.*;
// warm-up
// Good one
public class Main {

	static void solve() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), i = 0, r = 0, t = 0, max=Integer.MIN_VALUE;
		int[][] g = new int[2][n];
		int[] ltor = new int[n];
		int[] rtol = new int[n];
		while (r<2) {
			while (i<n) g[r][i++] = sc.nextInt();	
			r++; i=0;
		}
		i=0; t=0;
		for (int a : g[0]) { t+=a; ltor[i++]=t; }
		i=0; t=0;
		for (i=n-1; i>=0; i--) { t+=g[1][i]; rtol[i]=t; }
		for (i=0; i<n; i++) max = Math.max(ltor[i]+rtol[i], max);
		System.out.println(max);
		sc.close();		
	}

	public static void main(String args[]) {
		solve();
	}

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

	static void solve() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), i = 0, r = 0, t = 0, max=Integer.MIN_VALUE;
		int[][] g = new int[2][n];
		int[] ltor = new int[n];
		int[] rtol = new int[n];
		while (r<2) {
			while (i<n) g[r][i++] = sc.nextInt();	
			r++; i=0;
		}
		i=0; t=0;
		for (int a : g[0]) { t+=a; ltor[i++]=t; }
		i=0; t=0;
		for (i=n-1; i>=0; i--) { t+=g[1][i]; rtol[i]=t; }
		for (i=0; i<n; i++) max = Math.max(ltor[i]+rtol[i], max);
		System.out.println(max);
		sc.close();		
	}

	public static void main(String args[]) {
		solve();
	}

} Main static void solve() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), i = 0, r = 0, t = 0, max=Integer.MIN_VALUE;
		int[][] g = new int[2][n];
		int[] ltor = new int[n];
		int[] rtol = new int[n];
		while (r<2) {
			while (i<n) g[r][i++] = sc.nextInt();	
			r++; i=0;
		}
		i=0; t=0;
		for (int a : g[0]) { t+=a; ltor[i++]=t; }
		i=0; t=0;
		for (i=n-1; i>=0; i--) { t+=g[1][i]; rtol[i]=t; }
		for (i=0; i<n; i++) max = Math.max(ltor[i]+rtol[i], max);
		System.out.println(max);
		sc.close();		
	} solve {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), i = 0, r = 0, t = 0, max=Integer.MIN_VALUE;
		int[][] g = new int[2][n];
		int[] ltor = new int[n];
		int[] rtol = new int[n];
		while (r<2) {
			while (i<n) g[r][i++] = sc.nextInt();	
			r++; i=0;
		}
		i=0; t=0;
		for (int a : g[0]) { t+=a; ltor[i++]=t; }
		i=0; t=0;
		for (i=n-1; i>=0; i--) { t+=g[1][i]; rtol[i]=t; }
		for (i=0; i<n; i++) max = Math.max(ltor[i]+rtol[i], max);
		System.out.println(max);
		sc.close();		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt() n sc.nextInt() sc.nextInt sc i = 0 i 0 r = 0 r 0 t = 0 t 0 max=Integer.MIN_VALUE; max Integer.MIN_VALUE Integer Integer.MIN_VALUE int[][] g = new int[2][n]; g new int[2][n] 2 n int[] ltor = new int[n]; ltor new int[n] n int[] rtol = new int[n]; rtol new int[n] n while (r<2) {
			while (i<n) g[r][i++] = sc.nextInt();	
			r++; i=0;
		} r<2 r 2 {
			while (i<n) g[r][i++] = sc.nextInt();	
			r++; i=0;
		} while (i<n) g[r][i++] = sc.nextInt(); i<n i n g[r][i++] = sc.nextInt() g[r][i++] g[r] g r i++ i sc.nextInt() sc.nextInt sc r++ r i=0 i 0 i=0 i 0 t=0 t 0 for (int a : g[0]) { t+=a; ltor[i++]=t; } int a g[0] g 0 { t+=a; ltor[i++]=t; } { t+=a; ltor[i++]=t; } t+=a t a ltor[i++]=t ltor[i++] ltor i++ i t i=0 i 0 t=0 t 0 for (i=n-1; i>=0; i--) { t+=g[1][i]; rtol[i]=t; } i=n-1; i=n-1 i n-1 n 1 i>=0 i 0 i-- i-- i { t+=g[1][i]; rtol[i]=t; } { t+=g[1][i]; rtol[i]=t; } t+=g[1][i] t g[1][i] g[1] g 1 i rtol[i]=t rtol[i] rtol i t for (i=0; i<n; i++) max = Math.max(ltor[i]+rtol[i], max); i=0; i=0 i 0 i<n i n i++ i++ i max = Math.max(ltor[i]+rtol[i], max); max = Math.max(ltor[i]+rtol[i], max) max Math.max(ltor[i]+rtol[i], max) Math.max Math ltor[i]+rtol[i] ltor[i] ltor i rtol[i] rtol i max System.out.println(max) System.out.println System.out System System.out max sc.close() sc.close sc public static void main(String args[]) {
		solve();
	} main {
		solve();
	} solve() solve String args[] args public class Main {

	static void solve() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), i = 0, r = 0, t = 0, max=Integer.MIN_VALUE;
		int[][] g = new int[2][n];
		int[] ltor = new int[n];
		int[] rtol = new int[n];
		while (r<2) {
			while (i<n) g[r][i++] = sc.nextInt();	
			r++; i=0;
		}
		i=0; t=0;
		for (int a : g[0]) { t+=a; ltor[i++]=t; }
		i=0; t=0;
		for (i=n-1; i>=0; i--) { t+=g[1][i]; rtol[i]=t; }
		for (i=0; i<n; i++) max = Math.max(ltor[i]+rtol[i], max);
		System.out.println(max);
		sc.close();		
	}

	public static void main(String args[]) {
		solve();
	}

} public class Main {

	static void solve() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), i = 0, r = 0, t = 0, max=Integer.MIN_VALUE;
		int[][] g = new int[2][n];
		int[] ltor = new int[n];
		int[] rtol = new int[n];
		while (r<2) {
			while (i<n) g[r][i++] = sc.nextInt();	
			r++; i=0;
		}
		i=0; t=0;
		for (int a : g[0]) { t+=a; ltor[i++]=t; }
		i=0; t=0;
		for (i=n-1; i>=0; i--) { t+=g[1][i]; rtol[i]=t; }
		for (i=0; i<n; i++) max = Math.max(ltor[i]+rtol[i], max);
		System.out.println(max);
		sc.close();		
	}

	public static void main(String args[]) {
		solve();
	}

} Main
import java.util.*;
// warm-up
// Good one
public class Main {

	static void solve() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), i = 0, r = 0, t = 0, max=Integer.MIN_VALUE;
		int[][] g = new int[2][n];
		int[] ltor = new int[n];
		int[] rtol = new int[n];
		while (r<2) {
			while (i<n) g[r][i++] = sc.nextInt();	
			r++; i=0;
		}
		i=0; t=0;
		for (int a : g[0]) { t+=a; ltor[i++]=t; }
		i=0; t=0;
		for (i=n-1; i>=0; i--) { t+=g[1][i]; rtol[i]=t; }
		for (i=0; i<n; i++) max = Math.max(ltor[i]+rtol[i], max);
		System.out.println(max);
		sc.close();		
	}

	public static void main(String args[]) {
		solve();
	}

}