import java.io.*;
import java.util.*;
public class Main { // "Main" should be used for most online judges
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int nums[][] = new int[2][n];
		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < n; j++) {
				nums[i][j] = sc.nextInt();
			}
		}
		System.out.println(max(1, n - 1, nums));
	}
	public static int max(int y, int x, int[][] nums) {
		if(x == 0 && y == 0) return nums[0][0];
		if (x == 0) return nums[y][x] + nums[0][0];
		if (y == 0) return nums[y][x] + max(0, x - 1, nums);
		int num1 = max(0, x, nums);
		int num2 = max(1, x - 1, nums);
		return nums[y][x] + (num1 > num2 ? num1 : num2);
	}
} import java.io.*; io.* java import java.util.*; util.* java public class Main { // "Main" should be used for most online judges
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int nums[][] = new int[2][n];
		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < n; j++) {
				nums[i][j] = sc.nextInt();
			}
		}
		System.out.println(max(1, n - 1, nums));
	}
	public static int max(int y, int x, int[][] nums) {
		if(x == 0 && y == 0) return nums[0][0];
		if (x == 0) return nums[y][x] + nums[0][0];
		if (y == 0) return nums[y][x] + max(0, x - 1, nums);
		int num1 = max(0, x, nums);
		int num2 = max(1, x - 1, nums);
		return nums[y][x] + (num1 > num2 ? num1 : num2);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int nums[][] = new int[2][n];
		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < n; j++) {
				nums[i][j] = sc.nextInt();
			}
		}
		System.out.println(max(1, n - 1, nums));
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int nums[][] = new int[2][n];
		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < n; j++) {
				nums[i][j] = sc.nextInt();
			}
		}
		System.out.println(max(1, n - 1, nums));
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int nums[][] = new int[2][n]; nums new int[2][n] 2 n for(int i = 0; i < 2; i++) {
			for(int j = 0; j < n; j++) {
				nums[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++) {
				nums[i][j] = sc.nextInt();
			}
		} {
			for(int j = 0; j < n; j++) {
				nums[i][j] = sc.nextInt();
			}
		} for(int j = 0; j < n; j++) {
				nums[i][j] = sc.nextInt();
			} int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
				nums[i][j] = sc.nextInt();
			} {
				nums[i][j] = sc.nextInt();
			} nums[i][j] = sc.nextInt() nums[i][j] nums[i] nums i j sc.nextInt() sc.nextInt sc System.out.println(max(1, n - 1, nums)) System.out.println System.out System System.out max(1, n - 1, nums) max 1 n - 1 n 1 nums String[] args args public static int max(int y, int x, int[][] nums) {
		if(x == 0 && y == 0) return nums[0][0];
		if (x == 0) return nums[y][x] + nums[0][0];
		if (y == 0) return nums[y][x] + max(0, x - 1, nums);
		int num1 = max(0, x, nums);
		int num2 = max(1, x - 1, nums);
		return nums[y][x] + (num1 > num2 ? num1 : num2);
	} max {
		if(x == 0 && y == 0) return nums[0][0];
		if (x == 0) return nums[y][x] + nums[0][0];
		if (y == 0) return nums[y][x] + max(0, x - 1, nums);
		int num1 = max(0, x, nums);
		int num2 = max(1, x - 1, nums);
		return nums[y][x] + (num1 > num2 ? num1 : num2);
	} if(x == 0 && y == 0) return nums[0][0]; x == 0 && y == 0 x == 0 x 0 y == 0 y 0 return nums[0][0]; nums[0][0] nums[0] nums 0 0 if (x == 0) return nums[y][x] + nums[0][0]; x == 0 x 0 return nums[y][x] + nums[0][0]; nums[y][x] + nums[0][0] nums[y][x] nums[y] nums y x nums[0][0] nums[0] nums 0 0 if (y == 0) return nums[y][x] + max(0, x - 1, nums); y == 0 y 0 return nums[y][x] + max(0, x - 1, nums); nums[y][x] + max(0, x - 1, nums) nums[y][x] nums[y] nums y x max(0, x - 1, nums) max 0 x - 1 x 1 nums int num1 = max(0, x, nums); num1 max(0, x, nums) max 0 x nums int num2 = max(1, x - 1, nums); num2 max(1, x - 1, nums) max 1 x - 1 x 1 nums return nums[y][x] + (num1 > num2 ? num1 : num2); nums[y][x] + (num1 > num2 ? num1 : num2) nums[y][x] nums[y] nums y x (num1 > num2 ? num1 : num2) num1 > num2 num1 num2 num1 num2 int y y int x x int[][] nums nums public class Main { // "Main" should be used for most online judges
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int nums[][] = new int[2][n];
		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < n; j++) {
				nums[i][j] = sc.nextInt();
			}
		}
		System.out.println(max(1, n - 1, nums));
	}
	public static int max(int y, int x, int[][] nums) {
		if(x == 0 && y == 0) return nums[0][0];
		if (x == 0) return nums[y][x] + nums[0][0];
		if (y == 0) return nums[y][x] + max(0, x - 1, nums);
		int num1 = max(0, x, nums);
		int num2 = max(1, x - 1, nums);
		return nums[y][x] + (num1 > num2 ? num1 : num2);
	}
} public class Main { // "Main" should be used for most online judges
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int nums[][] = new int[2][n];
		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < n; j++) {
				nums[i][j] = sc.nextInt();
			}
		}
		System.out.println(max(1, n - 1, nums));
	}
	public static int max(int y, int x, int[][] nums) {
		if(x == 0 && y == 0) return nums[0][0];
		if (x == 0) return nums[y][x] + nums[0][0];
		if (y == 0) return nums[y][x] + max(0, x - 1, nums);
		int num1 = max(0, x, nums);
		int num2 = max(1, x - 1, nums);
		return nums[y][x] + (num1 > num2 ? num1 : num2);
	}
} Main
import java.io.*;
import java.util.*;
public class Main { // "Main" should be used for most online judges
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int nums[][] = new int[2][n];
		for(int i = 0; i < 2; i++) {
			for(int j = 0; j < n; j++) {
				nums[i][j] = sc.nextInt();
			}
		}
		System.out.println(max(1, n - 1, nums));
	}
	public static int max(int y, int x, int[][] nums) {
		if(x == 0 && y == 0) return nums[0][0];
		if (x == 0) return nums[y][x] + nums[0][0];
		if (y == 0) return nums[y][x] + max(0, x - 1, nums);
		int num1 = max(0, x, nums);
		int num2 = max(1, x - 1, nums);
		return nums[y][x] + (num1 > num2 ? num1 : num2);
	}
}