

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		int nCol = in.nextInt();
		int[][] arr = new int[3][nCol + 1];
		for(int i = 1; i <= 2; i++) 
			for(int j = 1; j <= nCol; j++)
				arr[i][j] = in.nextInt();
		int[][] dp = new int[3][nCol + 1];
		for(int j = 1; j <= nCol; j++) {
			for(int i = 1; i <= 2; i++) {
				dp[i][j] = arr[i][j] + Math.max(dp[i - 1][j], dp[i][j - 1]);
			}
		}
		System.out.println(dp[2][nCol]);
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		int nCol = in.nextInt();
		int[][] arr = new int[3][nCol + 1];
		for(int i = 1; i <= 2; i++) 
			for(int j = 1; j <= nCol; j++)
				arr[i][j] = in.nextInt();
		int[][] dp = new int[3][nCol + 1];
		for(int j = 1; j <= nCol; j++) {
			for(int i = 1; i <= 2; i++) {
				dp[i][j] = arr[i][j] + Math.max(dp[i - 1][j], dp[i][j - 1]);
			}
		}
		System.out.println(dp[2][nCol]);
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		int nCol = in.nextInt();
		int[][] arr = new int[3][nCol + 1];
		for(int i = 1; i <= 2; i++) 
			for(int j = 1; j <= nCol; j++)
				arr[i][j] = in.nextInt();
		int[][] dp = new int[3][nCol + 1];
		for(int j = 1; j <= nCol; j++) {
			for(int i = 1; i <= 2; i++) {
				dp[i][j] = arr[i][j] + Math.max(dp[i - 1][j], dp[i][j - 1]);
			}
		}
		System.out.println(dp[2][nCol]);
	} main {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		int nCol = in.nextInt();
		int[][] arr = new int[3][nCol + 1];
		for(int i = 1; i <= 2; i++) 
			for(int j = 1; j <= nCol; j++)
				arr[i][j] = in.nextInt();
		int[][] dp = new int[3][nCol + 1];
		for(int j = 1; j <= nCol; j++) {
			for(int i = 1; i <= 2; i++) {
				dp[i][j] = arr[i][j] + Math.max(dp[i - 1][j], dp[i][j - 1]);
			}
		}
		System.out.println(dp[2][nCol]);
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int nCol = in.nextInt(); nCol in.nextInt() in.nextInt in int[][] arr = new int[3][nCol + 1]; arr new int[3][nCol + 1] 3 nCol + 1 nCol 1 for(int i = 1; i <= 2; i++) 
			for(int j = 1; j <= nCol; j++)
				arr[i][j] = in.nextInt(); int i = 1; int i = 1; i 1 i <= 2 i 2 i++ i++ i for(int j = 1; j <= nCol; j++)
				arr[i][j] = in.nextInt(); for(int j = 1; j <= nCol; j++)
				arr[i][j] = in.nextInt(); int j = 1; int j = 1; j 1 j <= nCol j nCol j++ j++ j arr[i][j] = in.nextInt(); arr[i][j] = in.nextInt() arr[i][j] arr[i] arr i j in.nextInt() in.nextInt in int[][] dp = new int[3][nCol + 1]; dp new int[3][nCol + 1] 3 nCol + 1 nCol 1 for(int j = 1; j <= nCol; j++) {
			for(int i = 1; i <= 2; i++) {
				dp[i][j] = arr[i][j] + Math.max(dp[i - 1][j], dp[i][j - 1]);
			}
		} int j = 1; int j = 1; j 1 j <= nCol j nCol j++ j++ j {
			for(int i = 1; i <= 2; i++) {
				dp[i][j] = arr[i][j] + Math.max(dp[i - 1][j], dp[i][j - 1]);
			}
		} {
			for(int i = 1; i <= 2; i++) {
				dp[i][j] = arr[i][j] + Math.max(dp[i - 1][j], dp[i][j - 1]);
			}
		} for(int i = 1; i <= 2; i++) {
				dp[i][j] = arr[i][j] + Math.max(dp[i - 1][j], dp[i][j - 1]);
			} int i = 1; int i = 1; i 1 i <= 2 i 2 i++ i++ i {
				dp[i][j] = arr[i][j] + Math.max(dp[i - 1][j], dp[i][j - 1]);
			} {
				dp[i][j] = arr[i][j] + Math.max(dp[i - 1][j], dp[i][j - 1]);
			} dp[i][j] = arr[i][j] + Math.max(dp[i - 1][j], dp[i][j - 1]) dp[i][j] dp[i] dp i j arr[i][j] + Math.max(dp[i - 1][j], dp[i][j - 1]) arr[i][j] arr[i] arr i j Math.max(dp[i - 1][j], dp[i][j - 1]) Math.max Math dp[i - 1][j] dp[i - 1] dp i - 1 i 1 j dp[i][j - 1] dp[i] dp i j - 1 j 1 System.out.println(dp[2][nCol]) System.out.println System.out System System.out dp[2][nCol] dp[2] dp 2 nCol String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		int nCol = in.nextInt();
		int[][] arr = new int[3][nCol + 1];
		for(int i = 1; i <= 2; i++) 
			for(int j = 1; j <= nCol; j++)
				arr[i][j] = in.nextInt();
		int[][] dp = new int[3][nCol + 1];
		for(int j = 1; j <= nCol; j++) {
			for(int i = 1; i <= 2; i++) {
				dp[i][j] = arr[i][j] + Math.max(dp[i - 1][j], dp[i][j - 1]);
			}
		}
		System.out.println(dp[2][nCol]);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		int nCol = in.nextInt();
		int[][] arr = new int[3][nCol + 1];
		for(int i = 1; i <= 2; i++) 
			for(int j = 1; j <= nCol; j++)
				arr[i][j] = in.nextInt();
		int[][] dp = new int[3][nCol + 1];
		for(int j = 1; j <= nCol; j++) {
			for(int i = 1; i <= 2; i++) {
				dp[i][j] = arr[i][j] + Math.max(dp[i - 1][j], dp[i][j - 1]);
			}
		}
		System.out.println(dp[2][nCol]);
	}

} Main


import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		int nCol = in.nextInt();
		int[][] arr = new int[3][nCol + 1];
		for(int i = 1; i <= 2; i++) 
			for(int j = 1; j <= nCol; j++)
				arr[i][j] = in.nextInt();
		int[][] dp = new int[3][nCol + 1];
		for(int j = 1; j <= nCol; j++) {
			for(int i = 1; i <= 2; i++) {
				dp[i][j] = arr[i][j] + Math.max(dp[i - 1][j], dp[i][j - 1]);
			}
		}
		System.out.println(dp[2][nCol]);
	}

}
