import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner((System.in));
		int N = sc.nextInt();
		int[] a = new int[N];
		int[] b = new int[N+1];
		int sum = 0;
		int ans = 0, pre = 0;

		for (int i = 0; i < N; i++) {
			a[i] = sc.nextInt();
		}
		b[0] = 0;
		for (int i = 1; i <= N; i++) {
			b[i] = sc.nextInt();
			sum += b[i];
		}
		
		ans = sum;
		
		for (int i = 0; i < N; i++) {
			ans = ans + a[i] - b[i];
			if (ans > pre) {
				pre = ans;
			}
		}

		System.out.println(pre);

		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner((System.in));
		int N = sc.nextInt();
		int[] a = new int[N];
		int[] b = new int[N+1];
		int sum = 0;
		int ans = 0, pre = 0;

		for (int i = 0; i < N; i++) {
			a[i] = sc.nextInt();
		}
		b[0] = 0;
		for (int i = 1; i <= N; i++) {
			b[i] = sc.nextInt();
			sum += b[i];
		}
		
		ans = sum;
		
		for (int i = 0; i < N; i++) {
			ans = ans + a[i] - b[i];
			if (ans > pre) {
				pre = ans;
			}
		}

		System.out.println(pre);

		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner((System.in));
		int N = sc.nextInt();
		int[] a = new int[N];
		int[] b = new int[N+1];
		int sum = 0;
		int ans = 0, pre = 0;

		for (int i = 0; i < N; i++) {
			a[i] = sc.nextInt();
		}
		b[0] = 0;
		for (int i = 1; i <= N; i++) {
			b[i] = sc.nextInt();
			sum += b[i];
		}
		
		ans = sum;
		
		for (int i = 0; i < N; i++) {
			ans = ans + a[i] - b[i];
			if (ans > pre) {
				pre = ans;
			}
		}

		System.out.println(pre);

		sc.close();
	} main {
		Scanner sc = new Scanner((System.in));
		int N = sc.nextInt();
		int[] a = new int[N];
		int[] b = new int[N+1];
		int sum = 0;
		int ans = 0, pre = 0;

		for (int i = 0; i < N; i++) {
			a[i] = sc.nextInt();
		}
		b[0] = 0;
		for (int i = 1; i <= N; i++) {
			b[i] = sc.nextInt();
			sum += b[i];
		}
		
		ans = sum;
		
		for (int i = 0; i < N; i++) {
			ans = ans + a[i] - b[i];
			if (ans > pre) {
				pre = ans;
			}
		}

		System.out.println(pre);

		sc.close();
	} Scanner sc = new Scanner((System.in)); sc new Scanner((System.in)) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] a = new int[N]; a new int[N] N int[] b = new int[N+1]; b new int[N+1] N+1 N 1 int sum = 0; sum 0 int ans = 0 ans 0 pre = 0; pre 0 for (int i = 0; i < N; i++) {
			a[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			a[i] = sc.nextInt();
		} {
			a[i] = sc.nextInt();
		} a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc b[0] = 0 b[0] b 0 0 for (int i = 1; i <= N; i++) {
			b[i] = sc.nextInt();
			sum += b[i];
		} int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
			b[i] = sc.nextInt();
			sum += b[i];
		} {
			b[i] = sc.nextInt();
			sum += b[i];
		} b[i] = sc.nextInt() b[i] b i sc.nextInt() sc.nextInt sc sum += b[i] sum b[i] b i ans = sum ans sum for (int i = 0; i < N; i++) {
			ans = ans + a[i] - b[i];
			if (ans > pre) {
				pre = ans;
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			ans = ans + a[i] - b[i];
			if (ans > pre) {
				pre = ans;
			}
		} {
			ans = ans + a[i] - b[i];
			if (ans > pre) {
				pre = ans;
			}
		} ans = ans + a[i] - b[i] ans ans + a[i] - b[i] ans + a[i] ans a[i] a i b[i] b i if (ans > pre) {
				pre = ans;
			} ans > pre ans pre {
				pre = ans;
			} pre = ans pre ans System.out.println(pre) System.out.println System.out System System.out pre sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner((System.in));
		int N = sc.nextInt();
		int[] a = new int[N];
		int[] b = new int[N+1];
		int sum = 0;
		int ans = 0, pre = 0;

		for (int i = 0; i < N; i++) {
			a[i] = sc.nextInt();
		}
		b[0] = 0;
		for (int i = 1; i <= N; i++) {
			b[i] = sc.nextInt();
			sum += b[i];
		}
		
		ans = sum;
		
		for (int i = 0; i < N; i++) {
			ans = ans + a[i] - b[i];
			if (ans > pre) {
				pre = ans;
			}
		}

		System.out.println(pre);

		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner((System.in));
		int N = sc.nextInt();
		int[] a = new int[N];
		int[] b = new int[N+1];
		int sum = 0;
		int ans = 0, pre = 0;

		for (int i = 0; i < N; i++) {
			a[i] = sc.nextInt();
		}
		b[0] = 0;
		for (int i = 1; i <= N; i++) {
			b[i] = sc.nextInt();
			sum += b[i];
		}
		
		ans = sum;
		
		for (int i = 0; i < N; i++) {
			ans = ans + a[i] - b[i];
			if (ans > pre) {
				pre = ans;
			}
		}

		System.out.println(pre);

		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner((System.in));
		int N = sc.nextInt();
		int[] a = new int[N];
		int[] b = new int[N+1];
		int sum = 0;
		int ans = 0, pre = 0;

		for (int i = 0; i < N; i++) {
			a[i] = sc.nextInt();
		}
		b[0] = 0;
		for (int i = 1; i <= N; i++) {
			b[i] = sc.nextInt();
			sum += b[i];
		}
		
		ans = sum;
		
		for (int i = 0; i < N; i++) {
			ans = ans + a[i] - b[i];
			if (ans > pre) {
				pre = ans;
			}
		}

		System.out.println(pre);

		sc.close();
	}
}
