import java.util.Scanner;

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