import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = Integer.parseInt(sc.nextLine());
		int[][] map = new int[2][n];
		for (int i = 0; i < 2; i++) {
			String[] inputs = sc.nextLine().split(" ");
			for (int j = 0; j < n; j++) {
				map[i][j] = Integer.parseInt(inputs[j]);
			}
		}
		int max = 0;
		for (int i = 0; i < n; i++) {
			int count = 0;
			for (int j = 0; j <= i; j++) {
				count += map[0][j];
			}
			for (int k = i; k < n; k++) {
				count += map[1][k];
			}
			max = Math.max(max, count);
		}

		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 = Integer.parseInt(sc.nextLine());
		int[][] map = new int[2][n];
		for (int i = 0; i < 2; i++) {
			String[] inputs = sc.nextLine().split(" ");
			for (int j = 0; j < n; j++) {
				map[i][j] = Integer.parseInt(inputs[j]);
			}
		}
		int max = 0;
		for (int i = 0; i < n; i++) {
			int count = 0;
			for (int j = 0; j <= i; j++) {
				count += map[0][j];
			}
			for (int k = i; k < n; k++) {
				count += map[1][k];
			}
			max = Math.max(max, count);
		}

		System.out.println(max);

	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = Integer.parseInt(sc.nextLine());
		int[][] map = new int[2][n];
		for (int i = 0; i < 2; i++) {
			String[] inputs = sc.nextLine().split(" ");
			for (int j = 0; j < n; j++) {
				map[i][j] = Integer.parseInt(inputs[j]);
			}
		}
		int max = 0;
		for (int i = 0; i < n; i++) {
			int count = 0;
			for (int j = 0; j <= i; j++) {
				count += map[0][j];
			}
			for (int k = i; k < n; k++) {
				count += map[1][k];
			}
			max = Math.max(max, count);
		}

		System.out.println(max);

	} main {
		Scanner sc = new Scanner(System.in);

		int n = Integer.parseInt(sc.nextLine());
		int[][] map = new int[2][n];
		for (int i = 0; i < 2; i++) {
			String[] inputs = sc.nextLine().split(" ");
			for (int j = 0; j < n; j++) {
				map[i][j] = Integer.parseInt(inputs[j]);
			}
		}
		int max = 0;
		for (int i = 0; i < n; i++) {
			int count = 0;
			for (int j = 0; j <= i; j++) {
				count += map[0][j];
			}
			for (int k = i; k < n; k++) {
				count += map[1][k];
			}
			max = Math.max(max, count);
		}

		System.out.println(max);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.nextLine()); n Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int[][] map = new int[2][n]; map new int[2][n] 2 n for (int i = 0; i < 2; i++) {
			String[] inputs = sc.nextLine().split(" ");
			for (int j = 0; j < n; j++) {
				map[i][j] = Integer.parseInt(inputs[j]);
			}
		} int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
			String[] inputs = sc.nextLine().split(" ");
			for (int j = 0; j < n; j++) {
				map[i][j] = Integer.parseInt(inputs[j]);
			}
		} {
			String[] inputs = sc.nextLine().split(" ");
			for (int j = 0; j < n; j++) {
				map[i][j] = Integer.parseInt(inputs[j]);
			}
		} String[] inputs = sc.nextLine().split(" "); inputs sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " for (int j = 0; j < n; j++) {
				map[i][j] = Integer.parseInt(inputs[j]);
			} int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
				map[i][j] = Integer.parseInt(inputs[j]);
			} {
				map[i][j] = Integer.parseInt(inputs[j]);
			} map[i][j] = Integer.parseInt(inputs[j]) map[i][j] map[i] map i j Integer.parseInt(inputs[j]) Integer.parseInt Integer inputs[j] inputs j int max = 0; max 0 for (int i = 0; i < n; i++) {
			int count = 0;
			for (int j = 0; j <= i; j++) {
				count += map[0][j];
			}
			for (int k = i; k < n; k++) {
				count += map[1][k];
			}
			max = Math.max(max, count);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int count = 0;
			for (int j = 0; j <= i; j++) {
				count += map[0][j];
			}
			for (int k = i; k < n; k++) {
				count += map[1][k];
			}
			max = Math.max(max, count);
		} {
			int count = 0;
			for (int j = 0; j <= i; j++) {
				count += map[0][j];
			}
			for (int k = i; k < n; k++) {
				count += map[1][k];
			}
			max = Math.max(max, count);
		} int count = 0; count 0 for (int j = 0; j <= i; j++) {
				count += map[0][j];
			} int j = 0; int j = 0; j 0 j <= i j i j++ j++ j {
				count += map[0][j];
			} {
				count += map[0][j];
			} count += map[0][j] count map[0][j] map[0] map 0 j for (int k = i; k < n; k++) {
				count += map[1][k];
			} int k = i; int k = i; k i k < n k n k++ k++ k {
				count += map[1][k];
			} {
				count += map[1][k];
			} count += map[1][k] count map[1][k] map[1] map 1 k max = Math.max(max, count) max Math.max(max, count) Math.max Math max count 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 = Integer.parseInt(sc.nextLine());
		int[][] map = new int[2][n];
		for (int i = 0; i < 2; i++) {
			String[] inputs = sc.nextLine().split(" ");
			for (int j = 0; j < n; j++) {
				map[i][j] = Integer.parseInt(inputs[j]);
			}
		}
		int max = 0;
		for (int i = 0; i < n; i++) {
			int count = 0;
			for (int j = 0; j <= i; j++) {
				count += map[0][j];
			}
			for (int k = i; k < n; k++) {
				count += map[1][k];
			}
			max = Math.max(max, count);
		}

		System.out.println(max);

	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = Integer.parseInt(sc.nextLine());
		int[][] map = new int[2][n];
		for (int i = 0; i < 2; i++) {
			String[] inputs = sc.nextLine().split(" ");
			for (int j = 0; j < n; j++) {
				map[i][j] = Integer.parseInt(inputs[j]);
			}
		}
		int max = 0;
		for (int i = 0; i < n; i++) {
			int count = 0;
			for (int j = 0; j <= i; j++) {
				count += map[0][j];
			}
			for (int k = i; k < n; k++) {
				count += map[1][k];
			}
			max = Math.max(max, count);
		}

		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 = Integer.parseInt(sc.nextLine());
		int[][] map = new int[2][n];
		for (int i = 0; i < 2; i++) {
			String[] inputs = sc.nextLine().split(" ");
			for (int j = 0; j < n; j++) {
				map[i][j] = Integer.parseInt(inputs[j]);
			}
		}
		int max = 0;
		for (int i = 0; i < n; i++) {
			int count = 0;
			for (int j = 0; j <= i; j++) {
				count += map[0][j];
			}
			for (int k = i; k < n; k++) {
				count += map[1][k];
			}
			max = Math.max(max, count);
		}

		System.out.println(max);

	}
}