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