import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = new int[n];
		int[] b = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = scan.nextInt();
		}
		for (int i = 0; i < n; i++) {
			b[i] = scan.nextInt();
		}
		scan.close();
		int[] SA = new int[n+1];
		int[] SB = new int[n+1];
		SA[0] = 0;
		SB[0] = 0;

		for (int i = 1; i <= n; i++) {
			SA[i] = SA[i-1] + a[i-1];
			SB[i] = SB[i-1] + b[i-1];
		}
		int ans = 0;

		for (int i = 1; i <= n; i++) {
			int c = (SA[i]-SA[0])+(SB[n]-SB[i-1]);
			ans = Math.max(ans, c);
		}

		System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = new int[n];
		int[] b = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = scan.nextInt();
		}
		for (int i = 0; i < n; i++) {
			b[i] = scan.nextInt();
		}
		scan.close();
		int[] SA = new int[n+1];
		int[] SB = new int[n+1];
		SA[0] = 0;
		SB[0] = 0;

		for (int i = 1; i <= n; i++) {
			SA[i] = SA[i-1] + a[i-1];
			SB[i] = SB[i-1] + b[i-1];
		}
		int ans = 0;

		for (int i = 1; i <= n; i++) {
			int c = (SA[i]-SA[0])+(SB[n]-SB[i-1]);
			ans = Math.max(ans, c);
		}

		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = new int[n];
		int[] b = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = scan.nextInt();
		}
		for (int i = 0; i < n; i++) {
			b[i] = scan.nextInt();
		}
		scan.close();
		int[] SA = new int[n+1];
		int[] SB = new int[n+1];
		SA[0] = 0;
		SB[0] = 0;

		for (int i = 1; i <= n; i++) {
			SA[i] = SA[i-1] + a[i-1];
			SB[i] = SB[i-1] + b[i-1];
		}
		int ans = 0;

		for (int i = 1; i <= n; i++) {
			int c = (SA[i]-SA[0])+(SB[n]-SB[i-1]);
			ans = Math.max(ans, c);
		}

		System.out.println(ans);
	} main {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = new int[n];
		int[] b = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = scan.nextInt();
		}
		for (int i = 0; i < n; i++) {
			b[i] = scan.nextInt();
		}
		scan.close();
		int[] SA = new int[n+1];
		int[] SB = new int[n+1];
		SA[0] = 0;
		SB[0] = 0;

		for (int i = 1; i <= n; i++) {
			SA[i] = SA[i-1] + a[i-1];
			SB[i] = SB[i-1] + b[i-1];
		}
		int ans = 0;

		for (int i = 1; i <= n; i++) {
			int c = (SA[i]-SA[0])+(SB[n]-SB[i-1]);
			ans = Math.max(ans, c);
		}

		System.out.println(ans);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int[] a = new int[n]; a new int[n] n int[] b = new int[n]; b new int[n] n for (int i = 0; i < n; i++) {
			a[i] = scan.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			a[i] = scan.nextInt();
		} {
			a[i] = scan.nextInt();
		} a[i] = scan.nextInt() a[i] a i scan.nextInt() scan.nextInt scan for (int i = 0; i < n; i++) {
			b[i] = scan.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			b[i] = scan.nextInt();
		} {
			b[i] = scan.nextInt();
		} b[i] = scan.nextInt() b[i] b i scan.nextInt() scan.nextInt scan scan.close() scan.close scan int[] SA = new int[n+1]; SA new int[n+1] n+1 n 1 int[] SB = new int[n+1]; SB new int[n+1] n+1 n 1 SA[0] = 0 SA[0] SA 0 0 SB[0] = 0 SB[0] SB 0 0 for (int i = 1; i <= n; i++) {
			SA[i] = SA[i-1] + a[i-1];
			SB[i] = SB[i-1] + b[i-1];
		} int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
			SA[i] = SA[i-1] + a[i-1];
			SB[i] = SB[i-1] + b[i-1];
		} {
			SA[i] = SA[i-1] + a[i-1];
			SB[i] = SB[i-1] + b[i-1];
		} SA[i] = SA[i-1] + a[i-1] SA[i] SA i SA[i-1] + a[i-1] SA[i-1] SA i-1 i 1 a[i-1] a i-1 i 1 SB[i] = SB[i-1] + b[i-1] SB[i] SB i SB[i-1] + b[i-1] SB[i-1] SB i-1 i 1 b[i-1] b i-1 i 1 int ans = 0; ans 0 for (int i = 1; i <= n; i++) {
			int c = (SA[i]-SA[0])+(SB[n]-SB[i-1]);
			ans = Math.max(ans, c);
		} int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
			int c = (SA[i]-SA[0])+(SB[n]-SB[i-1]);
			ans = Math.max(ans, c);
		} {
			int c = (SA[i]-SA[0])+(SB[n]-SB[i-1]);
			ans = Math.max(ans, c);
		} int c = (SA[i]-SA[0])+(SB[n]-SB[i-1]); c (SA[i]-SA[0])+(SB[n]-SB[i-1]) (SA[i]-SA[0]) SA[i] SA i SA[0] SA 0 (SB[n]-SB[i-1]) SB[n] SB n SB[i-1] SB i-1 i 1 ans = Math.max(ans, c) ans Math.max(ans, c) Math.max Math ans c System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = new int[n];
		int[] b = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = scan.nextInt();
		}
		for (int i = 0; i < n; i++) {
			b[i] = scan.nextInt();
		}
		scan.close();
		int[] SA = new int[n+1];
		int[] SB = new int[n+1];
		SA[0] = 0;
		SB[0] = 0;

		for (int i = 1; i <= n; i++) {
			SA[i] = SA[i-1] + a[i-1];
			SB[i] = SB[i-1] + b[i-1];
		}
		int ans = 0;

		for (int i = 1; i <= n; i++) {
			int c = (SA[i]-SA[0])+(SB[n]-SB[i-1]);
			ans = Math.max(ans, c);
		}

		System.out.println(ans);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = new int[n];
		int[] b = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = scan.nextInt();
		}
		for (int i = 0; i < n; i++) {
			b[i] = scan.nextInt();
		}
		scan.close();
		int[] SA = new int[n+1];
		int[] SB = new int[n+1];
		SA[0] = 0;
		SB[0] = 0;

		for (int i = 1; i <= n; i++) {
			SA[i] = SA[i-1] + a[i-1];
			SB[i] = SB[i-1] + b[i-1];
		}
		int ans = 0;

		for (int i = 1; i <= n; i++) {
			int c = (SA[i]-SA[0])+(SB[n]-SB[i-1]);
			ans = Math.max(ans, c);
		}

		System.out.println(ans);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = new int[n];
		int[] b = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = scan.nextInt();
		}
		for (int i = 0; i < n; i++) {
			b[i] = scan.nextInt();
		}
		scan.close();
		int[] SA = new int[n+1];
		int[] SB = new int[n+1];
		SA[0] = 0;
		SB[0] = 0;

		for (int i = 1; i <= n; i++) {
			SA[i] = SA[i-1] + a[i-1];
			SB[i] = SB[i-1] + b[i-1];
		}
		int ans = 0;

		for (int i = 1; i <= n; i++) {
			int c = (SA[i]-SA[0])+(SB[n]-SB[i-1]);
			ans = Math.max(ans, c);
		}

		System.out.println(ans);
	}
}
