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[3][n + 1];
		int sum = 0;
		for (int i = 1; i <= n; i++) {
			a[1][i] = sc.nextInt();
		}
		sum += a[1][1];
		for (int i = 1; i <= n; i++) {
			a[2][i] = sc.nextInt();
			sum += a[2][i];
		}
		int ans = sum;
		for (int i = 2; i <= n; i++) {
sum=sum-a[2][i-1]+a[1][i];
if(ans<=sum){
	ans=sum;
}
		}
		System.out.println(ans);
	}
} 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[3][n + 1];
		int sum = 0;
		for (int i = 1; i <= n; i++) {
			a[1][i] = sc.nextInt();
		}
		sum += a[1][1];
		for (int i = 1; i <= n; i++) {
			a[2][i] = sc.nextInt();
			sum += a[2][i];
		}
		int ans = sum;
		for (int i = 2; i <= n; i++) {
sum=sum-a[2][i-1]+a[1][i];
if(ans<=sum){
	ans=sum;
}
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		int a[][] = new int[3][n + 1];
		int sum = 0;
		for (int i = 1; i <= n; i++) {
			a[1][i] = sc.nextInt();
		}
		sum += a[1][1];
		for (int i = 1; i <= n; i++) {
			a[2][i] = sc.nextInt();
			sum += a[2][i];
		}
		int ans = sum;
		for (int i = 2; i <= n; i++) {
sum=sum-a[2][i-1]+a[1][i];
if(ans<=sum){
	ans=sum;
}
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		int a[][] = new int[3][n + 1];
		int sum = 0;
		for (int i = 1; i <= n; i++) {
			a[1][i] = sc.nextInt();
		}
		sum += a[1][1];
		for (int i = 1; i <= n; i++) {
			a[2][i] = sc.nextInt();
			sum += a[2][i];
		}
		int ans = sum;
		for (int i = 2; i <= n; i++) {
sum=sum-a[2][i-1]+a[1][i];
if(ans<=sum){
	ans=sum;
}
		}
		System.out.println(ans);
	} 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[3][n + 1]; a new int[3][n + 1] 3 n + 1 n 1 int sum = 0; sum 0 for (int i = 1; i <= n; i++) {
			a[1][i] = sc.nextInt();
		} int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
			a[1][i] = sc.nextInt();
		} {
			a[1][i] = sc.nextInt();
		} a[1][i] = sc.nextInt() a[1][i] a[1] a 1 i sc.nextInt() sc.nextInt sc sum += a[1][1] sum a[1][1] a[1] a 1 1 for (int i = 1; i <= n; i++) {
			a[2][i] = sc.nextInt();
			sum += a[2][i];
		} int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
			a[2][i] = sc.nextInt();
			sum += a[2][i];
		} {
			a[2][i] = sc.nextInt();
			sum += a[2][i];
		} a[2][i] = sc.nextInt() a[2][i] a[2] a 2 i sc.nextInt() sc.nextInt sc sum += a[2][i] sum a[2][i] a[2] a 2 i int ans = sum; ans sum for (int i = 2; i <= n; i++) {
sum=sum-a[2][i-1]+a[1][i];
if(ans<=sum){
	ans=sum;
}
		} int i = 2; int i = 2; i 2 i <= n i n i++ i++ i {
sum=sum-a[2][i-1]+a[1][i];
if(ans<=sum){
	ans=sum;
}
		} {
sum=sum-a[2][i-1]+a[1][i];
if(ans<=sum){
	ans=sum;
}
		} sum=sum-a[2][i-1]+a[1][i] sum sum-a[2][i-1]+a[1][i] sum-a[2][i-1] sum a[2][i-1] a[2] a 2 i-1 i 1 a[1][i] a[1] a 1 i if(ans<=sum){
	ans=sum;
} ans<=sum ans sum {
	ans=sum;
} ans=sum ans sum 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 sc = new Scanner(System.in);

		int n = sc.nextInt();

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

		int n = sc.nextInt();

		int a[][] = new int[3][n + 1];
		int sum = 0;
		for (int i = 1; i <= n; i++) {
			a[1][i] = sc.nextInt();
		}
		sum += a[1][1];
		for (int i = 1; i <= n; i++) {
			a[2][i] = sc.nextInt();
			sum += a[2][i];
		}
		int ans = sum;
		for (int i = 2; i <= n; i++) {
sum=sum-a[2][i-1]+a[1][i];
if(ans<=sum){
	ans=sum;
}
		}
		System.out.println(ans);
	}
} 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[3][n + 1];
		int sum = 0;
		for (int i = 1; i <= n; i++) {
			a[1][i] = sc.nextInt();
		}
		sum += a[1][1];
		for (int i = 1; i <= n; i++) {
			a[2][i] = sc.nextInt();
			sum += a[2][i];
		}
		int ans = sum;
		for (int i = 2; i <= n; i++) {
sum=sum-a[2][i-1]+a[1][i];
if(ans<=sum){
	ans=sum;
}
		}
		System.out.println(ans);
	}
}
