import java.util.Scanner;

public class Main {

	static int n, a[][];

	public static int solve() {
		int ans = 0, max = 0;
		for(int i = 0; i < n; ++i) {
			ans = a[0][0];
			for(int j = 0; j < n; ++j) {
				if(j < i)ans += a[0][j + 1];
				else ans += a[1][j];
			}
			max = Math.max(max,  ans);
		}
		return max;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		a = new int[2][n];
		for (int i = 0; i < 2; ++i) {
			for (int j = 0; j < n; ++j)
				a[i][j] = sc.nextInt();
		}
		sc.close();
		int ans = solve();
		System.out.println(ans);
	}

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

	static int n, a[][];

	public static int solve() {
		int ans = 0, max = 0;
		for(int i = 0; i < n; ++i) {
			ans = a[0][0];
			for(int j = 0; j < n; ++j) {
				if(j < i)ans += a[0][j + 1];
				else ans += a[1][j];
			}
			max = Math.max(max,  ans);
		}
		return max;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		a = new int[2][n];
		for (int i = 0; i < 2; ++i) {
			for (int j = 0; j < n; ++j)
				a[i][j] = sc.nextInt();
		}
		sc.close();
		int ans = solve();
		System.out.println(ans);
	}

} Main static int n n a[][]; a public static int solve() {
		int ans = 0, max = 0;
		for(int i = 0; i < n; ++i) {
			ans = a[0][0];
			for(int j = 0; j < n; ++j) {
				if(j < i)ans += a[0][j + 1];
				else ans += a[1][j];
			}
			max = Math.max(max,  ans);
		}
		return max;
	} solve {
		int ans = 0, max = 0;
		for(int i = 0; i < n; ++i) {
			ans = a[0][0];
			for(int j = 0; j < n; ++j) {
				if(j < i)ans += a[0][j + 1];
				else ans += a[1][j];
			}
			max = Math.max(max,  ans);
		}
		return max;
	} int ans = 0 ans 0 max = 0; max 0 for(int i = 0; i < n; ++i) {
			ans = a[0][0];
			for(int j = 0; j < n; ++j) {
				if(j < i)ans += a[0][j + 1];
				else ans += a[1][j];
			}
			max = Math.max(max,  ans);
		} int i = 0; int i = 0; i 0 i < n i n ++i ++i i {
			ans = a[0][0];
			for(int j = 0; j < n; ++j) {
				if(j < i)ans += a[0][j + 1];
				else ans += a[1][j];
			}
			max = Math.max(max,  ans);
		} {
			ans = a[0][0];
			for(int j = 0; j < n; ++j) {
				if(j < i)ans += a[0][j + 1];
				else ans += a[1][j];
			}
			max = Math.max(max,  ans);
		} ans = a[0][0] ans a[0][0] a[0] a 0 0 for(int j = 0; j < n; ++j) {
				if(j < i)ans += a[0][j + 1];
				else ans += a[1][j];
			} int j = 0; int j = 0; j 0 j < n j n ++j ++j j {
				if(j < i)ans += a[0][j + 1];
				else ans += a[1][j];
			} {
				if(j < i)ans += a[0][j + 1];
				else ans += a[1][j];
			} if(j < i)ans += a[0][j + 1];
				else ans += a[1][j]; j < i j i ans += a[0][j + 1] ans a[0][j + 1] a[0] a 0 j + 1 j 1 ans += a[1][j] ans a[1][j] a[1] a 1 j max = Math.max(max,  ans) max Math.max(max,  ans) Math.max Math max ans return max; max public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		a = new int[2][n];
		for (int i = 0; i < 2; ++i) {
			for (int j = 0; j < n; ++j)
				a[i][j] = sc.nextInt();
		}
		sc.close();
		int ans = solve();
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		a = new int[2][n];
		for (int i = 0; i < 2; ++i) {
			for (int j = 0; j < n; ++j)
				a[i][j] = sc.nextInt();
		}
		sc.close();
		int ans = solve();
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) n = sc.nextInt() n sc.nextInt() sc.nextInt sc a = new int[2][n] a new int[2][n] 2 n for (int i = 0; i < 2; ++i) {
			for (int j = 0; j < n; ++j)
				a[i][j] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < 2 i 2 ++i ++i i {
			for (int j = 0; j < n; ++j)
				a[i][j] = sc.nextInt();
		} {
			for (int j = 0; j < n; ++j)
				a[i][j] = sc.nextInt();
		} for (int j = 0; j < n; ++j)
				a[i][j] = sc.nextInt(); int j = 0; int j = 0; j 0 j < n j n ++j ++j j a[i][j] = sc.nextInt(); a[i][j] = sc.nextInt() a[i][j] a[i] a i j sc.nextInt() sc.nextInt sc sc.close() sc.close sc int ans = solve(); ans solve() solve System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	static int n, a[][];

	public static int solve() {
		int ans = 0, max = 0;
		for(int i = 0; i < n; ++i) {
			ans = a[0][0];
			for(int j = 0; j < n; ++j) {
				if(j < i)ans += a[0][j + 1];
				else ans += a[1][j];
			}
			max = Math.max(max,  ans);
		}
		return max;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		a = new int[2][n];
		for (int i = 0; i < 2; ++i) {
			for (int j = 0; j < n; ++j)
				a[i][j] = sc.nextInt();
		}
		sc.close();
		int ans = solve();
		System.out.println(ans);
	}

} public class Main {

	static int n, a[][];

	public static int solve() {
		int ans = 0, max = 0;
		for(int i = 0; i < n; ++i) {
			ans = a[0][0];
			for(int j = 0; j < n; ++j) {
				if(j < i)ans += a[0][j + 1];
				else ans += a[1][j];
			}
			max = Math.max(max,  ans);
		}
		return max;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		a = new int[2][n];
		for (int i = 0; i < 2; ++i) {
			for (int j = 0; j < n; ++j)
				a[i][j] = sc.nextInt();
		}
		sc.close();
		int ans = solve();
		System.out.println(ans);
	}

} Main
import java.util.Scanner;

public class Main {

	static int n, a[][];

	public static int solve() {
		int ans = 0, max = 0;
		for(int i = 0; i < n; ++i) {
			ans = a[0][0];
			for(int j = 0; j < n; ++j) {
				if(j < i)ans += a[0][j + 1];
				else ans += a[1][j];
			}
			max = Math.max(max,  ans);
		}
		return max;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		a = new int[2][n];
		for (int i = 0; i < 2; ++i) {
			for (int j = 0; j < n; ++j)
				a[i][j] = sc.nextInt();
		}
		sc.close();
		int ans = solve();
		System.out.println(ans);
	}

}
