import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		/*String a = s.next();
		String b = s.next();
		*/
		int N = s.nextInt();
		int[][] arr = new int[2][N];
		int count = 0;
		int upSum = 0;
		int downSum = 0;
		int[] upArr = new int[N];
		int[] downArr = new int[N];
		int tmpcount = 0;

		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < N; j++) {
				arr[i][j] = s.nextInt();
			}
		}
		for (int i = 0; i < N; i++) {
			upSum += arr[0][i];
			downSum += arr[1][i];
		}
		count = Math.max(downSum, upSum);

		for (int i = 0; i < N; i++) {
			if (i == 0) {
				upArr[0] = arr[0][0];
			} else {
				upArr[i] = arr[0][i] + upArr[i - 1];
			}
		}
		for (int j = 0; j < N; j++) {
			if (j == 0) {
				downArr[0] = downSum;
			} else {
				downArr[j] = downArr[j - 1] - arr[1][j - 1];
			}
		}
		for (int k = 0; k < N; k++) {
			tmpcount = upArr[k] + downArr[k];
			count = Math.max(count, tmpcount);
		}
		System.out.println(count);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		/*String a = s.next();
		String b = s.next();
		*/
		int N = s.nextInt();
		int[][] arr = new int[2][N];
		int count = 0;
		int upSum = 0;
		int downSum = 0;
		int[] upArr = new int[N];
		int[] downArr = new int[N];
		int tmpcount = 0;

		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < N; j++) {
				arr[i][j] = s.nextInt();
			}
		}
		for (int i = 0; i < N; i++) {
			upSum += arr[0][i];
			downSum += arr[1][i];
		}
		count = Math.max(downSum, upSum);

		for (int i = 0; i < N; i++) {
			if (i == 0) {
				upArr[0] = arr[0][0];
			} else {
				upArr[i] = arr[0][i] + upArr[i - 1];
			}
		}
		for (int j = 0; j < N; j++) {
			if (j == 0) {
				downArr[0] = downSum;
			} else {
				downArr[j] = downArr[j - 1] - arr[1][j - 1];
			}
		}
		for (int k = 0; k < N; k++) {
			tmpcount = upArr[k] + downArr[k];
			count = Math.max(count, tmpcount);
		}
		System.out.println(count);
	}
} Main public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		/*String a = s.next();
		String b = s.next();
		*/
		int N = s.nextInt();
		int[][] arr = new int[2][N];
		int count = 0;
		int upSum = 0;
		int downSum = 0;
		int[] upArr = new int[N];
		int[] downArr = new int[N];
		int tmpcount = 0;

		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < N; j++) {
				arr[i][j] = s.nextInt();
			}
		}
		for (int i = 0; i < N; i++) {
			upSum += arr[0][i];
			downSum += arr[1][i];
		}
		count = Math.max(downSum, upSum);

		for (int i = 0; i < N; i++) {
			if (i == 0) {
				upArr[0] = arr[0][0];
			} else {
				upArr[i] = arr[0][i] + upArr[i - 1];
			}
		}
		for (int j = 0; j < N; j++) {
			if (j == 0) {
				downArr[0] = downSum;
			} else {
				downArr[j] = downArr[j - 1] - arr[1][j - 1];
			}
		}
		for (int k = 0; k < N; k++) {
			tmpcount = upArr[k] + downArr[k];
			count = Math.max(count, tmpcount);
		}
		System.out.println(count);
	} main {
		Scanner s = new Scanner(System.in);
		/*String a = s.next();
		String b = s.next();
		*/
		int N = s.nextInt();
		int[][] arr = new int[2][N];
		int count = 0;
		int upSum = 0;
		int downSum = 0;
		int[] upArr = new int[N];
		int[] downArr = new int[N];
		int tmpcount = 0;

		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < N; j++) {
				arr[i][j] = s.nextInt();
			}
		}
		for (int i = 0; i < N; i++) {
			upSum += arr[0][i];
			downSum += arr[1][i];
		}
		count = Math.max(downSum, upSum);

		for (int i = 0; i < N; i++) {
			if (i == 0) {
				upArr[0] = arr[0][0];
			} else {
				upArr[i] = arr[0][i] + upArr[i - 1];
			}
		}
		for (int j = 0; j < N; j++) {
			if (j == 0) {
				downArr[0] = downSum;
			} else {
				downArr[j] = downArr[j - 1] - arr[1][j - 1];
			}
		}
		for (int k = 0; k < N; k++) {
			tmpcount = upArr[k] + downArr[k];
			count = Math.max(count, tmpcount);
		}
		System.out.println(count);
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int N = s.nextInt(); N s.nextInt() s.nextInt s int[][] arr = new int[2][N]; arr new int[2][N] 2 N int count = 0; count 0 int upSum = 0; upSum 0 int downSum = 0; downSum 0 int[] upArr = new int[N]; upArr new int[N] N int[] downArr = new int[N]; downArr new int[N] N int tmpcount = 0; tmpcount 0 for (int i = 0; i < 2; i++) {
			for (int j = 0; j < N; j++) {
				arr[i][j] = s.nextInt();
			}
		} int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
			for (int j = 0; j < N; j++) {
				arr[i][j] = s.nextInt();
			}
		} {
			for (int j = 0; j < N; j++) {
				arr[i][j] = s.nextInt();
			}
		} for (int j = 0; j < N; j++) {
				arr[i][j] = s.nextInt();
			} int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
				arr[i][j] = s.nextInt();
			} {
				arr[i][j] = s.nextInt();
			} arr[i][j] = s.nextInt() arr[i][j] arr[i] arr i j s.nextInt() s.nextInt s for (int i = 0; i < N; i++) {
			upSum += arr[0][i];
			downSum += arr[1][i];
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			upSum += arr[0][i];
			downSum += arr[1][i];
		} {
			upSum += arr[0][i];
			downSum += arr[1][i];
		} upSum += arr[0][i] upSum arr[0][i] arr[0] arr 0 i downSum += arr[1][i] downSum arr[1][i] arr[1] arr 1 i count = Math.max(downSum, upSum) count Math.max(downSum, upSum) Math.max Math downSum upSum for (int i = 0; i < N; i++) {
			if (i == 0) {
				upArr[0] = arr[0][0];
			} else {
				upArr[i] = arr[0][i] + upArr[i - 1];
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			if (i == 0) {
				upArr[0] = arr[0][0];
			} else {
				upArr[i] = arr[0][i] + upArr[i - 1];
			}
		} {
			if (i == 0) {
				upArr[0] = arr[0][0];
			} else {
				upArr[i] = arr[0][i] + upArr[i - 1];
			}
		} if (i == 0) {
				upArr[0] = arr[0][0];
			} else {
				upArr[i] = arr[0][i] + upArr[i - 1];
			} i == 0 i 0 {
				upArr[0] = arr[0][0];
			} upArr[0] = arr[0][0] upArr[0] upArr 0 arr[0][0] arr[0] arr 0 0 {
				upArr[i] = arr[0][i] + upArr[i - 1];
			} upArr[i] = arr[0][i] + upArr[i - 1] upArr[i] upArr i arr[0][i] + upArr[i - 1] arr[0][i] arr[0] arr 0 i upArr[i - 1] upArr i - 1 i 1 for (int j = 0; j < N; j++) {
			if (j == 0) {
				downArr[0] = downSum;
			} else {
				downArr[j] = downArr[j - 1] - arr[1][j - 1];
			}
		} int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
			if (j == 0) {
				downArr[0] = downSum;
			} else {
				downArr[j] = downArr[j - 1] - arr[1][j - 1];
			}
		} {
			if (j == 0) {
				downArr[0] = downSum;
			} else {
				downArr[j] = downArr[j - 1] - arr[1][j - 1];
			}
		} if (j == 0) {
				downArr[0] = downSum;
			} else {
				downArr[j] = downArr[j - 1] - arr[1][j - 1];
			} j == 0 j 0 {
				downArr[0] = downSum;
			} downArr[0] = downSum downArr[0] downArr 0 downSum {
				downArr[j] = downArr[j - 1] - arr[1][j - 1];
			} downArr[j] = downArr[j - 1] - arr[1][j - 1] downArr[j] downArr j downArr[j - 1] - arr[1][j - 1] downArr[j - 1] downArr j - 1 j 1 arr[1][j - 1] arr[1] arr 1 j - 1 j 1 for (int k = 0; k < N; k++) {
			tmpcount = upArr[k] + downArr[k];
			count = Math.max(count, tmpcount);
		} int k = 0; int k = 0; k 0 k < N k N k++ k++ k {
			tmpcount = upArr[k] + downArr[k];
			count = Math.max(count, tmpcount);
		} {
			tmpcount = upArr[k] + downArr[k];
			count = Math.max(count, tmpcount);
		} tmpcount = upArr[k] + downArr[k] tmpcount upArr[k] + downArr[k] upArr[k] upArr k downArr[k] downArr k count = Math.max(count, tmpcount) count Math.max(count, tmpcount) Math.max Math count tmpcount System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		/*String a = s.next();
		String b = s.next();
		*/
		int N = s.nextInt();
		int[][] arr = new int[2][N];
		int count = 0;
		int upSum = 0;
		int downSum = 0;
		int[] upArr = new int[N];
		int[] downArr = new int[N];
		int tmpcount = 0;

		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < N; j++) {
				arr[i][j] = s.nextInt();
			}
		}
		for (int i = 0; i < N; i++) {
			upSum += arr[0][i];
			downSum += arr[1][i];
		}
		count = Math.max(downSum, upSum);

		for (int i = 0; i < N; i++) {
			if (i == 0) {
				upArr[0] = arr[0][0];
			} else {
				upArr[i] = arr[0][i] + upArr[i - 1];
			}
		}
		for (int j = 0; j < N; j++) {
			if (j == 0) {
				downArr[0] = downSum;
			} else {
				downArr[j] = downArr[j - 1] - arr[1][j - 1];
			}
		}
		for (int k = 0; k < N; k++) {
			tmpcount = upArr[k] + downArr[k];
			count = Math.max(count, tmpcount);
		}
		System.out.println(count);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		/*String a = s.next();
		String b = s.next();
		*/
		int N = s.nextInt();
		int[][] arr = new int[2][N];
		int count = 0;
		int upSum = 0;
		int downSum = 0;
		int[] upArr = new int[N];
		int[] downArr = new int[N];
		int tmpcount = 0;

		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < N; j++) {
				arr[i][j] = s.nextInt();
			}
		}
		for (int i = 0; i < N; i++) {
			upSum += arr[0][i];
			downSum += arr[1][i];
		}
		count = Math.max(downSum, upSum);

		for (int i = 0; i < N; i++) {
			if (i == 0) {
				upArr[0] = arr[0][0];
			} else {
				upArr[i] = arr[0][i] + upArr[i - 1];
			}
		}
		for (int j = 0; j < N; j++) {
			if (j == 0) {
				downArr[0] = downSum;
			} else {
				downArr[j] = downArr[j - 1] - arr[1][j - 1];
			}
		}
		for (int k = 0; k < N; k++) {
			tmpcount = upArr[k] + downArr[k];
			count = Math.max(count, tmpcount);
		}
		System.out.println(count);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		/*String a = s.next();
		String b = s.next();
		*/
		int N = s.nextInt();
		int[][] arr = new int[2][N];
		int count = 0;
		int upSum = 0;
		int downSum = 0;
		int[] upArr = new int[N];
		int[] downArr = new int[N];
		int tmpcount = 0;

		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < N; j++) {
				arr[i][j] = s.nextInt();
			}
		}
		for (int i = 0; i < N; i++) {
			upSum += arr[0][i];
			downSum += arr[1][i];
		}
		count = Math.max(downSum, upSum);

		for (int i = 0; i < N; i++) {
			if (i == 0) {
				upArr[0] = arr[0][0];
			} else {
				upArr[i] = arr[0][i] + upArr[i - 1];
			}
		}
		for (int j = 0; j < N; j++) {
			if (j == 0) {
				downArr[0] = downSum;
			} else {
				downArr[j] = downArr[j - 1] - arr[1][j - 1];
			}
		}
		for (int k = 0; k < N; k++) {
			tmpcount = upArr[k] + downArr[k];
			count = Math.max(count, tmpcount);
		}
		System.out.println(count);
	}
}