
import java.util.*;

public class Main {

	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int a[][] = new int[2][n];
		int sum[][] = new int[2][n+1];
		for(int i=0; i<2; i++) {
			for(int j=0; j<n; j++) {
				a[i][j]=sc.nextInt();
				sum[i][j+1] = sum[i][j] + a[i][j];
			}
		}
		int ans = 0;
		for(int i=1; i<=n; i++) {
			int sum1 = sum[0][i];
			int sum2 = sum[1][n] - sum[1][i-1];
			ans = Math.max(ans, sum1+sum2);
		}
		System.out.println(ans);
		sc.close();
	}
} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int a[][] = new int[2][n];
		int sum[][] = new int[2][n+1];
		for(int i=0; i<2; i++) {
			for(int j=0; j<n; j++) {
				a[i][j]=sc.nextInt();
				sum[i][j+1] = sum[i][j] + a[i][j];
			}
		}
		int ans = 0;
		for(int i=1; i<=n; i++) {
			int sum1 = sum[0][i];
			int sum2 = sum[1][n] - sum[1][i-1];
			ans = Math.max(ans, sum1+sum2);
		}
		System.out.println(ans);
		sc.close();
	}
} Main public static void main(String[] args) {
		Main main = new Main();
		main.run();
	} main {
		Main main = new Main();
		main.run();
	} Main main = new Main(); main new Main() main.run() main.run main String[] args args public void run() {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int a[][] = new int[2][n];
		int sum[][] = new int[2][n+1];
		for(int i=0; i<2; i++) {
			for(int j=0; j<n; j++) {
				a[i][j]=sc.nextInt();
				sum[i][j+1] = sum[i][j] + a[i][j];
			}
		}
		int ans = 0;
		for(int i=1; i<=n; i++) {
			int sum1 = sum[0][i];
			int sum2 = sum[1][n] - sum[1][i-1];
			ans = Math.max(ans, sum1+sum2);
		}
		System.out.println(ans);
		sc.close();
	} run {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int a[][] = new int[2][n];
		int sum[][] = new int[2][n+1];
		for(int i=0; i<2; i++) {
			for(int j=0; j<n; j++) {
				a[i][j]=sc.nextInt();
				sum[i][j+1] = sum[i][j] + a[i][j];
			}
		}
		int ans = 0;
		for(int i=1; i<=n; i++) {
			int sum1 = sum[0][i];
			int sum2 = sum[1][n] - sum[1][i-1];
			ans = Math.max(ans, sum1+sum2);
		}
		System.out.println(ans);
		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[2][n]; a new int[2][n] 2 n int sum[][] = new int[2][n+1]; sum new int[2][n+1] 2 n+1 n 1 for(int i=0; i<2; i++) {
			for(int j=0; j<n; j++) {
				a[i][j]=sc.nextInt();
				sum[i][j+1] = sum[i][j] + a[i][j];
			}
		} int i=0; int i=0; i 0 i<2 i 2 i++ i++ i {
			for(int j=0; j<n; j++) {
				a[i][j]=sc.nextInt();
				sum[i][j+1] = sum[i][j] + a[i][j];
			}
		} {
			for(int j=0; j<n; j++) {
				a[i][j]=sc.nextInt();
				sum[i][j+1] = sum[i][j] + a[i][j];
			}
		} for(int j=0; j<n; j++) {
				a[i][j]=sc.nextInt();
				sum[i][j+1] = sum[i][j] + a[i][j];
			} int j=0; int j=0; j 0 j<n j n j++ j++ j {
				a[i][j]=sc.nextInt();
				sum[i][j+1] = sum[i][j] + a[i][j];
			} {
				a[i][j]=sc.nextInt();
				sum[i][j+1] = sum[i][j] + a[i][j];
			} a[i][j]=sc.nextInt() a[i][j] a[i] a i j sc.nextInt() sc.nextInt sc sum[i][j+1] = sum[i][j] + a[i][j] sum[i][j+1] sum[i] sum i j+1 j 1 sum[i][j] + a[i][j] sum[i][j] sum[i] sum i j a[i][j] a[i] a i j int ans = 0; ans 0 for(int i=1; i<=n; i++) {
			int sum1 = sum[0][i];
			int sum2 = sum[1][n] - sum[1][i-1];
			ans = Math.max(ans, sum1+sum2);
		} int i=1; int i=1; i 1 i<=n i n i++ i++ i {
			int sum1 = sum[0][i];
			int sum2 = sum[1][n] - sum[1][i-1];
			ans = Math.max(ans, sum1+sum2);
		} {
			int sum1 = sum[0][i];
			int sum2 = sum[1][n] - sum[1][i-1];
			ans = Math.max(ans, sum1+sum2);
		} int sum1 = sum[0][i]; sum1 sum[0][i] sum[0] sum 0 i int sum2 = sum[1][n] - sum[1][i-1]; sum2 sum[1][n] - sum[1][i-1] sum[1][n] sum[1] sum 1 n sum[1][i-1] sum[1] sum 1 i-1 i 1 ans = Math.max(ans, sum1+sum2) ans Math.max(ans, sum1+sum2) Math.max Math ans sum1+sum2 sum1 sum2 System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc public class Main {

	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int a[][] = new int[2][n];
		int sum[][] = new int[2][n+1];
		for(int i=0; i<2; i++) {
			for(int j=0; j<n; j++) {
				a[i][j]=sc.nextInt();
				sum[i][j+1] = sum[i][j] + a[i][j];
			}
		}
		int ans = 0;
		for(int i=1; i<=n; i++) {
			int sum1 = sum[0][i];
			int sum2 = sum[1][n] - sum[1][i-1];
			ans = Math.max(ans, sum1+sum2);
		}
		System.out.println(ans);
		sc.close();
	}
} public class Main {

	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int a[][] = new int[2][n];
		int sum[][] = new int[2][n+1];
		for(int i=0; i<2; i++) {
			for(int j=0; j<n; j++) {
				a[i][j]=sc.nextInt();
				sum[i][j+1] = sum[i][j] + a[i][j];
			}
		}
		int ans = 0;
		for(int i=1; i<=n; i++) {
			int sum1 = sum[0][i];
			int sum2 = sum[1][n] - sum[1][i-1];
			ans = Math.max(ans, sum1+sum2);
		}
		System.out.println(ans);
		sc.close();
	}
} Main

import java.util.*;

public class Main {

	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int a[][] = new int[2][n];
		int sum[][] = new int[2][n+1];
		for(int i=0; i<2; i++) {
			for(int j=0; j<n; j++) {
				a[i][j]=sc.nextInt();
				sum[i][j+1] = sum[i][j] + a[i][j];
			}
		}
		int ans = 0;
		for(int i=1; i<=n; i++) {
			int sum1 = sum[0][i];
			int sum2 = sum[1][n] - sum[1][i-1];
			ans = Math.max(ans, sum1+sum2);
		}
		System.out.println(ans);
		sc.close();
	}
}
