
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int N = in.nextInt();
		int[][] A = new int[2][N];
		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < N; j++) {
				A[i][j] = in.nextInt();
			}
		}
		int ans = 0;
		for (int i = 0; i < N; i++) {
			int sum = 0;
			for (int j = 0; j <= i; j++) {
				sum += A[0][j];
			}
			for (int j = i; j < N; j++) {
				sum += A[1][j];
			}
			ans = Math.max(ans, sum);
		}
		System.out.println(ans);
		in.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {

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

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int N = in.nextInt();
		int[][] A = new int[2][N];
		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < N; j++) {
				A[i][j] = in.nextInt();
			}
		}
		int ans = 0;
		for (int i = 0; i < N; i++) {
			int sum = 0;
			for (int j = 0; j <= i; j++) {
				sum += A[0][j];
			}
			for (int j = i; j < N; j++) {
				sum += A[1][j];
			}
			ans = Math.max(ans, sum);
		}
		System.out.println(ans);
		in.close();
	}
} public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int N = in.nextInt();
		int[][] A = new int[2][N];
		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < N; j++) {
				A[i][j] = in.nextInt();
			}
		}
		int ans = 0;
		for (int i = 0; i < N; i++) {
			int sum = 0;
			for (int j = 0; j <= i; j++) {
				sum += A[0][j];
			}
			for (int j = i; j < N; j++) {
				sum += A[1][j];
			}
			ans = Math.max(ans, sum);
		}
		System.out.println(ans);
		in.close();
	}
} Main

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int N = in.nextInt();
		int[][] A = new int[2][N];
		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < N; j++) {
				A[i][j] = in.nextInt();
			}
		}
		int ans = 0;
		for (int i = 0; i < N; i++) {
			int sum = 0;
			for (int j = 0; j <= i; j++) {
				sum += A[0][j];
			}
			for (int j = i; j < N; j++) {
				sum += A[1][j];
			}
			ans = Math.max(ans, sum);
		}
		System.out.println(ans);
		in.close();
	}
}