import java.util.Scanner;

public class Main{
	static int a[][] = new int[3][101];
	static int dp[][] = new int[3][101];
	static int n;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		for (int i = 1; i <= 2; i++) {
				for (int j = 1; j <= n; j++) {
					a[i][j] = sc.nextInt();
				}
			}
			solve();
      
			System.out.println(dp[2][n]);
		}

	

	private static void solve() {
		dp[1][1] = a[1][1];
		for (int i = 1; i <= 2; ++i) {
			for (int j = 1; j <= n; ++j) {
				if (i == 1)
					dp[i][j] = dp[i][j - 1] + a[i][j];// 说明第一步往下走
				else
					dp[i][j] = Math.max(dp[i - 1][j]+a[i][j], dp[i][j - 1] + a[i][j]);

			}
		}

	}
} import java.util.Scanner; Scanner java.util public class Main{
	static int a[][] = new int[3][101];
	static int dp[][] = new int[3][101];
	static int n;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		for (int i = 1; i <= 2; i++) {
				for (int j = 1; j <= n; j++) {
					a[i][j] = sc.nextInt();
				}
			}
			solve();
      
			System.out.println(dp[2][n]);
		}

	

	private static void solve() {
		dp[1][1] = a[1][1];
		for (int i = 1; i <= 2; ++i) {
			for (int j = 1; j <= n; ++j) {
				if (i == 1)
					dp[i][j] = dp[i][j - 1] + a[i][j];// 说明第一步往下走
				else
					dp[i][j] = Math.max(dp[i - 1][j]+a[i][j], dp[i][j - 1] + a[i][j]);

			}
		}

	}
} Main static int a[][] = new int[3][101]; a new int[3][101] 3 101 static int dp[][] = new int[3][101]; dp new int[3][101] 3 101 static int n; n public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		for (int i = 1; i <= 2; i++) {
				for (int j = 1; j <= n; j++) {
					a[i][j] = sc.nextInt();
				}
			}
			solve();
      
			System.out.println(dp[2][n]);
		} main {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		for (int i = 1; i <= 2; i++) {
				for (int j = 1; j <= n; j++) {
					a[i][j] = sc.nextInt();
				}
			}
			solve();
      
			System.out.println(dp[2][n]);
		} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) n = sc.nextInt() n sc.nextInt() sc.nextInt sc for (int i = 1; i <= 2; i++) {
				for (int j = 1; j <= n; j++) {
					a[i][j] = sc.nextInt();
				}
			} int i = 1; int i = 1; i 1 i <= 2 i 2 i++ i++ i {
				for (int j = 1; j <= n; j++) {
					a[i][j] = sc.nextInt();
				}
			} {
				for (int j = 1; j <= n; j++) {
					a[i][j] = sc.nextInt();
				}
			} for (int j = 1; j <= n; j++) {
					a[i][j] = sc.nextInt();
				} int j = 1; int j = 1; j 1 j <= n j n j++ j++ j {
					a[i][j] = sc.nextInt();
				} {
					a[i][j] = sc.nextInt();
				} a[i][j] = sc.nextInt() a[i][j] a[i] a i j sc.nextInt() sc.nextInt sc solve() solve System.out.println(dp[2][n]) System.out.println System.out System System.out dp[2][n] dp[2] dp 2 n String[] args args private static void solve() {
		dp[1][1] = a[1][1];
		for (int i = 1; i <= 2; ++i) {
			for (int j = 1; j <= n; ++j) {
				if (i == 1)
					dp[i][j] = dp[i][j - 1] + a[i][j];// 说明第一步往下走
				else
					dp[i][j] = Math.max(dp[i - 1][j]+a[i][j], dp[i][j - 1] + a[i][j]);

			}
		}

	} solve {
		dp[1][1] = a[1][1];
		for (int i = 1; i <= 2; ++i) {
			for (int j = 1; j <= n; ++j) {
				if (i == 1)
					dp[i][j] = dp[i][j - 1] + a[i][j];// 说明第一步往下走
				else
					dp[i][j] = Math.max(dp[i - 1][j]+a[i][j], dp[i][j - 1] + a[i][j]);

			}
		}

	} dp[1][1] = a[1][1] dp[1][1] dp[1] dp 1 1 a[1][1] a[1] a 1 1 for (int i = 1; i <= 2; ++i) {
			for (int j = 1; j <= n; ++j) {
				if (i == 1)
					dp[i][j] = dp[i][j - 1] + a[i][j];// 说明第一步往下走
				else
					dp[i][j] = Math.max(dp[i - 1][j]+a[i][j], dp[i][j - 1] + a[i][j]);

			}
		} int i = 1; int i = 1; i 1 i <= 2 i 2 ++i ++i i {
			for (int j = 1; j <= n; ++j) {
				if (i == 1)
					dp[i][j] = dp[i][j - 1] + a[i][j];// 说明第一步往下走
				else
					dp[i][j] = Math.max(dp[i - 1][j]+a[i][j], dp[i][j - 1] + a[i][j]);

			}
		} {
			for (int j = 1; j <= n; ++j) {
				if (i == 1)
					dp[i][j] = dp[i][j - 1] + a[i][j];// 说明第一步往下走
				else
					dp[i][j] = Math.max(dp[i - 1][j]+a[i][j], dp[i][j - 1] + a[i][j]);

			}
		} for (int j = 1; j <= n; ++j) {
				if (i == 1)
					dp[i][j] = dp[i][j - 1] + a[i][j];// 说明第一步往下走
				else
					dp[i][j] = Math.max(dp[i - 1][j]+a[i][j], dp[i][j - 1] + a[i][j]);

			} int j = 1; int j = 1; j 1 j <= n j n ++j ++j j {
				if (i == 1)
					dp[i][j] = dp[i][j - 1] + a[i][j];// 说明第一步往下走
				else
					dp[i][j] = Math.max(dp[i - 1][j]+a[i][j], dp[i][j - 1] + a[i][j]);

			} {
				if (i == 1)
					dp[i][j] = dp[i][j - 1] + a[i][j];// 说明第一步往下走
				else
					dp[i][j] = Math.max(dp[i - 1][j]+a[i][j], dp[i][j - 1] + a[i][j]);

			} if (i == 1)
					dp[i][j] = dp[i][j - 1] + a[i][j];// 说明第一步往下走
				else
					dp[i][j] = Math.max(dp[i - 1][j]+a[i][j], dp[i][j - 1] + a[i][j]); i == 1 i 1 dp[i][j] = dp[i][j - 1] + a[i][j] dp[i][j] dp[i] dp i j dp[i][j - 1] + a[i][j] dp[i][j - 1] dp[i] dp i j - 1 j 1 a[i][j] a[i] a i j dp[i][j] = Math.max(dp[i - 1][j]+a[i][j], dp[i][j - 1] + a[i][j]) dp[i][j] dp[i] dp i j Math.max(dp[i - 1][j]+a[i][j], dp[i][j - 1] + a[i][j]) Math.max Math dp[i - 1][j]+a[i][j] dp[i - 1][j] dp[i - 1] dp i - 1 i 1 j a[i][j] a[i] a i j dp[i][j - 1] + a[i][j] dp[i][j - 1] dp[i] dp i j - 1 j 1 a[i][j] a[i] a i j public class Main{
	static int a[][] = new int[3][101];
	static int dp[][] = new int[3][101];
	static int n;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		for (int i = 1; i <= 2; i++) {
				for (int j = 1; j <= n; j++) {
					a[i][j] = sc.nextInt();
				}
			}
			solve();
      
			System.out.println(dp[2][n]);
		}

	

	private static void solve() {
		dp[1][1] = a[1][1];
		for (int i = 1; i <= 2; ++i) {
			for (int j = 1; j <= n; ++j) {
				if (i == 1)
					dp[i][j] = dp[i][j - 1] + a[i][j];// 说明第一步往下走
				else
					dp[i][j] = Math.max(dp[i - 1][j]+a[i][j], dp[i][j - 1] + a[i][j]);

			}
		}

	}
} public class Main{
	static int a[][] = new int[3][101];
	static int dp[][] = new int[3][101];
	static int n;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		for (int i = 1; i <= 2; i++) {
				for (int j = 1; j <= n; j++) {
					a[i][j] = sc.nextInt();
				}
			}
			solve();
      
			System.out.println(dp[2][n]);
		}

	

	private static void solve() {
		dp[1][1] = a[1][1];
		for (int i = 1; i <= 2; ++i) {
			for (int j = 1; j <= n; ++j) {
				if (i == 1)
					dp[i][j] = dp[i][j - 1] + a[i][j];// 说明第一步往下走
				else
					dp[i][j] = Math.max(dp[i - 1][j]+a[i][j], dp[i][j - 1] + a[i][j]);

			}
		}

	}
} Main
import java.util.Scanner;

public class Main{
	static int a[][] = new int[3][101];
	static int dp[][] = new int[3][101];
	static int n;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		for (int i = 1; i <= 2; i++) {
				for (int j = 1; j <= n; j++) {
					a[i][j] = sc.nextInt();
				}
			}
			solve();
      
			System.out.println(dp[2][n]);
		}

	

	private static void solve() {
		dp[1][1] = a[1][1];
		for (int i = 1; i <= 2; ++i) {
			for (int j = 1; j <= n; ++j) {
				if (i == 1)
					dp[i][j] = dp[i][j - 1] + a[i][j];// 说明第一步往下走
				else
					dp[i][j] = Math.max(dp[i - 1][j]+a[i][j], dp[i][j - 1] + a[i][j]);

			}
		}

	}
}