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