import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		try {
			int width = Integer.parseInt(scanner.nextLine());
			int height = 2;

			int[][] candyLines = new int[height][width];
			int[][] sum = new int[height][width];
			for (int x = 0; x < height; x++) {
				int sumTmp = 0;
				for (int y = 0; y < width; y++) {
					candyLines[x][y] = scanner.nextInt();
					sumTmp += candyLines[x][y];
					sum[x][y] = sumTmp;
				}
			}

			int maxCandy = 0;
			for (int i = 0; i < width; i++) {
				int candy = sum[0][i] + sum[1][width-1] - (i-1>=0?sum[1][i-1]:0);
				if (candy > maxCandy) {
					maxCandy = candy;
				}
			}
			System.out.print(maxCandy);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			scanner.close();
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		try {
			int width = Integer.parseInt(scanner.nextLine());
			int height = 2;

			int[][] candyLines = new int[height][width];
			int[][] sum = new int[height][width];
			for (int x = 0; x < height; x++) {
				int sumTmp = 0;
				for (int y = 0; y < width; y++) {
					candyLines[x][y] = scanner.nextInt();
					sumTmp += candyLines[x][y];
					sum[x][y] = sumTmp;
				}
			}

			int maxCandy = 0;
			for (int i = 0; i < width; i++) {
				int candy = sum[0][i] + sum[1][width-1] - (i-1>=0?sum[1][i-1]:0);
				if (candy > maxCandy) {
					maxCandy = candy;
				}
			}
			System.out.print(maxCandy);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			scanner.close();
		}
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		try {
			int width = Integer.parseInt(scanner.nextLine());
			int height = 2;

			int[][] candyLines = new int[height][width];
			int[][] sum = new int[height][width];
			for (int x = 0; x < height; x++) {
				int sumTmp = 0;
				for (int y = 0; y < width; y++) {
					candyLines[x][y] = scanner.nextInt();
					sumTmp += candyLines[x][y];
					sum[x][y] = sumTmp;
				}
			}

			int maxCandy = 0;
			for (int i = 0; i < width; i++) {
				int candy = sum[0][i] + sum[1][width-1] - (i-1>=0?sum[1][i-1]:0);
				if (candy > maxCandy) {
					maxCandy = candy;
				}
			}
			System.out.print(maxCandy);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			scanner.close();
		}
	} main {
		Scanner scanner = new Scanner(System.in);
		try {
			int width = Integer.parseInt(scanner.nextLine());
			int height = 2;

			int[][] candyLines = new int[height][width];
			int[][] sum = new int[height][width];
			for (int x = 0; x < height; x++) {
				int sumTmp = 0;
				for (int y = 0; y < width; y++) {
					candyLines[x][y] = scanner.nextInt();
					sumTmp += candyLines[x][y];
					sum[x][y] = sumTmp;
				}
			}

			int maxCandy = 0;
			for (int i = 0; i < width; i++) {
				int candy = sum[0][i] + sum[1][width-1] - (i-1>=0?sum[1][i-1]:0);
				if (candy > maxCandy) {
					maxCandy = candy;
				}
			}
			System.out.print(maxCandy);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			scanner.close();
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) try {
			int width = Integer.parseInt(scanner.nextLine());
			int height = 2;

			int[][] candyLines = new int[height][width];
			int[][] sum = new int[height][width];
			for (int x = 0; x < height; x++) {
				int sumTmp = 0;
				for (int y = 0; y < width; y++) {
					candyLines[x][y] = scanner.nextInt();
					sumTmp += candyLines[x][y];
					sum[x][y] = sumTmp;
				}
			}

			int maxCandy = 0;
			for (int i = 0; i < width; i++) {
				int candy = sum[0][i] + sum[1][width-1] - (i-1>=0?sum[1][i-1]:0);
				if (candy > maxCandy) {
					maxCandy = candy;
				}
			}
			System.out.print(maxCandy);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			scanner.close();
		} catch (Exception e) {
			e.printStackTrace();
		} Exception e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			scanner.close();
		} scanner.close() scanner.close scanner {
			int width = Integer.parseInt(scanner.nextLine());
			int height = 2;

			int[][] candyLines = new int[height][width];
			int[][] sum = new int[height][width];
			for (int x = 0; x < height; x++) {
				int sumTmp = 0;
				for (int y = 0; y < width; y++) {
					candyLines[x][y] = scanner.nextInt();
					sumTmp += candyLines[x][y];
					sum[x][y] = sumTmp;
				}
			}

			int maxCandy = 0;
			for (int i = 0; i < width; i++) {
				int candy = sum[0][i] + sum[1][width-1] - (i-1>=0?sum[1][i-1]:0);
				if (candy > maxCandy) {
					maxCandy = candy;
				}
			}
			System.out.print(maxCandy);
		} int width = Integer.parseInt(scanner.nextLine()); width Integer.parseInt(scanner.nextLine()) Integer.parseInt Integer scanner.nextLine() scanner.nextLine scanner int height = 2; height 2 int[][] candyLines = new int[height][width]; candyLines new int[height][width] height width int[][] sum = new int[height][width]; sum new int[height][width] height width for (int x = 0; x < height; x++) {
				int sumTmp = 0;
				for (int y = 0; y < width; y++) {
					candyLines[x][y] = scanner.nextInt();
					sumTmp += candyLines[x][y];
					sum[x][y] = sumTmp;
				}
			} int x = 0; int x = 0; x 0 x < height x height x++ x++ x {
				int sumTmp = 0;
				for (int y = 0; y < width; y++) {
					candyLines[x][y] = scanner.nextInt();
					sumTmp += candyLines[x][y];
					sum[x][y] = sumTmp;
				}
			} {
				int sumTmp = 0;
				for (int y = 0; y < width; y++) {
					candyLines[x][y] = scanner.nextInt();
					sumTmp += candyLines[x][y];
					sum[x][y] = sumTmp;
				}
			} int sumTmp = 0; sumTmp 0 for (int y = 0; y < width; y++) {
					candyLines[x][y] = scanner.nextInt();
					sumTmp += candyLines[x][y];
					sum[x][y] = sumTmp;
				} int y = 0; int y = 0; y 0 y < width y width y++ y++ y {
					candyLines[x][y] = scanner.nextInt();
					sumTmp += candyLines[x][y];
					sum[x][y] = sumTmp;
				} {
					candyLines[x][y] = scanner.nextInt();
					sumTmp += candyLines[x][y];
					sum[x][y] = sumTmp;
				} candyLines[x][y] = scanner.nextInt() candyLines[x][y] candyLines[x] candyLines x y scanner.nextInt() scanner.nextInt scanner sumTmp += candyLines[x][y] sumTmp candyLines[x][y] candyLines[x] candyLines x y sum[x][y] = sumTmp sum[x][y] sum[x] sum x y sumTmp int maxCandy = 0; maxCandy 0 for (int i = 0; i < width; i++) {
				int candy = sum[0][i] + sum[1][width-1] - (i-1>=0?sum[1][i-1]:0);
				if (candy > maxCandy) {
					maxCandy = candy;
				}
			} int i = 0; int i = 0; i 0 i < width i width i++ i++ i {
				int candy = sum[0][i] + sum[1][width-1] - (i-1>=0?sum[1][i-1]:0);
				if (candy > maxCandy) {
					maxCandy = candy;
				}
			} {
				int candy = sum[0][i] + sum[1][width-1] - (i-1>=0?sum[1][i-1]:0);
				if (candy > maxCandy) {
					maxCandy = candy;
				}
			} int candy = sum[0][i] + sum[1][width-1] - (i-1>=0?sum[1][i-1]:0); candy sum[0][i] + sum[1][width-1] - (i-1>=0?sum[1][i-1]:0) sum[0][i] + sum[1][width-1] sum[0][i] sum[0] sum 0 i sum[1][width-1] sum[1] sum 1 width-1 width 1 (i-1>=0?sum[1][i-1]:0) i-1>=0 i-1 i 1 0 sum[1][i-1] sum[1] sum 1 i-1 i 1 0 if (candy > maxCandy) {
					maxCandy = candy;
				} candy > maxCandy candy maxCandy {
					maxCandy = candy;
				} maxCandy = candy maxCandy candy System.out.print(maxCandy) System.out.print System.out System System.out maxCandy String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		try {
			int width = Integer.parseInt(scanner.nextLine());
			int height = 2;

			int[][] candyLines = new int[height][width];
			int[][] sum = new int[height][width];
			for (int x = 0; x < height; x++) {
				int sumTmp = 0;
				for (int y = 0; y < width; y++) {
					candyLines[x][y] = scanner.nextInt();
					sumTmp += candyLines[x][y];
					sum[x][y] = sumTmp;
				}
			}

			int maxCandy = 0;
			for (int i = 0; i < width; i++) {
				int candy = sum[0][i] + sum[1][width-1] - (i-1>=0?sum[1][i-1]:0);
				if (candy > maxCandy) {
					maxCandy = candy;
				}
			}
			System.out.print(maxCandy);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			scanner.close();
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		try {
			int width = Integer.parseInt(scanner.nextLine());
			int height = 2;

			int[][] candyLines = new int[height][width];
			int[][] sum = new int[height][width];
			for (int x = 0; x < height; x++) {
				int sumTmp = 0;
				for (int y = 0; y < width; y++) {
					candyLines[x][y] = scanner.nextInt();
					sumTmp += candyLines[x][y];
					sum[x][y] = sumTmp;
				}
			}

			int maxCandy = 0;
			for (int i = 0; i < width; i++) {
				int candy = sum[0][i] + sum[1][width-1] - (i-1>=0?sum[1][i-1]:0);
				if (candy > maxCandy) {
					maxCandy = candy;
				}
			}
			System.out.print(maxCandy);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			scanner.close();
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		try {
			int width = Integer.parseInt(scanner.nextLine());
			int height = 2;

			int[][] candyLines = new int[height][width];
			int[][] sum = new int[height][width];
			for (int x = 0; x < height; x++) {
				int sumTmp = 0;
				for (int y = 0; y < width; y++) {
					candyLines[x][y] = scanner.nextInt();
					sumTmp += candyLines[x][y];
					sum[x][y] = sumTmp;
				}
			}

			int maxCandy = 0;
			for (int i = 0; i < width; i++) {
				int candy = sum[0][i] + sum[1][width-1] - (i-1>=0?sum[1][i-1]:0);
				if (candy > maxCandy) {
					maxCandy = candy;
				}
			}
			System.out.print(maxCandy);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			scanner.close();
		}
	}
}
