import java.io.File;
import java.io.IOException;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.List;
import java.util.Scanner;

public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner in = new Scanner(file);
		
		Scanner in = new Scanner(System.in);
		
		int N = in.nextInt();
		int[][] A = new int[2][N+1];
		for(int i = 1; i <= N; i++){
			A[0][i] = A[0][i-1] + in.nextInt();
		}
		for(int i = 1; i <= N; i++){
			A[1][i] = A[1][i-1] + in.nextInt();
		}
		
		int max = 0;
		for(int i = 1; i <= N; i++){
			int m = (A[0][i] - A[0][0]) + (A[1][N] - A[1][i-1]);
			//System.out.println((A[0][i] - A[0][0]) + " " + (A[1][N] - A[1][i-1]));
			max = Math.max(m, max);
		}
		
		System.out.println(max);
	}
} import java.io.File; File java.io import java.io.IOException; IOException java.io import java.util.ArrayDeque; ArrayDeque java.util import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Comparator; Comparator java.util import java.util.Deque; Deque java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner in = new Scanner(file);
		
		Scanner in = new Scanner(System.in);
		
		int N = in.nextInt();
		int[][] A = new int[2][N+1];
		for(int i = 1; i <= N; i++){
			A[0][i] = A[0][i-1] + in.nextInt();
		}
		for(int i = 1; i <= N; i++){
			A[1][i] = A[1][i-1] + in.nextInt();
		}
		
		int max = 0;
		for(int i = 1; i <= N; i++){
			int m = (A[0][i] - A[0][0]) + (A[1][N] - A[1][i-1]);
			//System.out.println((A[0][i] - A[0][0]) + " " + (A[1][N] - A[1][i-1]));
			max = Math.max(m, max);
		}
		
		System.out.println(max);
	}
} Main public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner in = new Scanner(file);
		
		Scanner in = new Scanner(System.in);
		
		int N = in.nextInt();
		int[][] A = new int[2][N+1];
		for(int i = 1; i <= N; i++){
			A[0][i] = A[0][i-1] + in.nextInt();
		}
		for(int i = 1; i <= N; i++){
			A[1][i] = A[1][i-1] + in.nextInt();
		}
		
		int max = 0;
		for(int i = 1; i <= N; i++){
			int m = (A[0][i] - A[0][0]) + (A[1][N] - A[1][i-1]);
			//System.out.println((A[0][i] - A[0][0]) + " " + (A[1][N] - A[1][i-1]));
			max = Math.max(m, max);
		}
		
		System.out.println(max);
	} main {
		//File file = new File("input.txt");
		//Scanner in = new Scanner(file);
		
		Scanner in = new Scanner(System.in);
		
		int N = in.nextInt();
		int[][] A = new int[2][N+1];
		for(int i = 1; i <= N; i++){
			A[0][i] = A[0][i-1] + in.nextInt();
		}
		for(int i = 1; i <= N; i++){
			A[1][i] = A[1][i-1] + in.nextInt();
		}
		
		int max = 0;
		for(int i = 1; i <= N; i++){
			int m = (A[0][i] - A[0][0]) + (A[1][N] - A[1][i-1]);
			//System.out.println((A[0][i] - A[0][0]) + " " + (A[1][N] - A[1][i-1]));
			max = Math.max(m, max);
		}
		
		System.out.println(max);
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int N = in.nextInt(); N in.nextInt() in.nextInt in int[][] A = new int[2][N+1]; A new int[2][N+1] 2 N+1 N 1 for(int i = 1; i <= N; i++){
			A[0][i] = A[0][i-1] + in.nextInt();
		} int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
			A[0][i] = A[0][i-1] + in.nextInt();
		} {
			A[0][i] = A[0][i-1] + in.nextInt();
		} A[0][i] = A[0][i-1] + in.nextInt() A[0][i] A[0] A 0 i A[0][i-1] + in.nextInt() A[0][i-1] A[0] A 0 i-1 i 1 in.nextInt() in.nextInt in for(int i = 1; i <= N; i++){
			A[1][i] = A[1][i-1] + in.nextInt();
		} int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
			A[1][i] = A[1][i-1] + in.nextInt();
		} {
			A[1][i] = A[1][i-1] + in.nextInt();
		} A[1][i] = A[1][i-1] + in.nextInt() A[1][i] A[1] A 1 i A[1][i-1] + in.nextInt() A[1][i-1] A[1] A 1 i-1 i 1 in.nextInt() in.nextInt in int max = 0; max 0 for(int i = 1; i <= N; i++){
			int m = (A[0][i] - A[0][0]) + (A[1][N] - A[1][i-1]);
			//System.out.println((A[0][i] - A[0][0]) + " " + (A[1][N] - A[1][i-1]));
			max = Math.max(m, max);
		} int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
			int m = (A[0][i] - A[0][0]) + (A[1][N] - A[1][i-1]);
			//System.out.println((A[0][i] - A[0][0]) + " " + (A[1][N] - A[1][i-1]));
			max = Math.max(m, max);
		} {
			int m = (A[0][i] - A[0][0]) + (A[1][N] - A[1][i-1]);
			//System.out.println((A[0][i] - A[0][0]) + " " + (A[1][N] - A[1][i-1]));
			max = Math.max(m, max);
		} int m = (A[0][i] - A[0][0]) + (A[1][N] - A[1][i-1]); m (A[0][i] - A[0][0]) + (A[1][N] - A[1][i-1]) (A[0][i] - A[0][0]) A[0][i] A[0] A 0 i A[0][0] A[0] A 0 0 (A[1][N] - A[1][i-1]) A[1][N] A[1] A 1 N A[1][i-1] A[1] A 1 i-1 i 1 max = Math.max(m, max) max Math.max(m, max) Math.max Math m max 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) throws IOException {
		//File file = new File("input.txt");
		//Scanner in = new Scanner(file);
		
		Scanner in = new Scanner(System.in);
		
		int N = in.nextInt();
		int[][] A = new int[2][N+1];
		for(int i = 1; i <= N; i++){
			A[0][i] = A[0][i-1] + in.nextInt();
		}
		for(int i = 1; i <= N; i++){
			A[1][i] = A[1][i-1] + in.nextInt();
		}
		
		int max = 0;
		for(int i = 1; i <= N; i++){
			int m = (A[0][i] - A[0][0]) + (A[1][N] - A[1][i-1]);
			//System.out.println((A[0][i] - A[0][0]) + " " + (A[1][N] - A[1][i-1]));
			max = Math.max(m, max);
		}
		
		System.out.println(max);
	}
} public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner in = new Scanner(file);
		
		Scanner in = new Scanner(System.in);
		
		int N = in.nextInt();
		int[][] A = new int[2][N+1];
		for(int i = 1; i <= N; i++){
			A[0][i] = A[0][i-1] + in.nextInt();
		}
		for(int i = 1; i <= N; i++){
			A[1][i] = A[1][i-1] + in.nextInt();
		}
		
		int max = 0;
		for(int i = 1; i <= N; i++){
			int m = (A[0][i] - A[0][0]) + (A[1][N] - A[1][i-1]);
			//System.out.println((A[0][i] - A[0][0]) + " " + (A[1][N] - A[1][i-1]));
			max = Math.max(m, max);
		}
		
		System.out.println(max);
	}
} Main
import java.io.File;
import java.io.IOException;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.List;
import java.util.Scanner;

public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner in = new Scanner(file);
		
		Scanner in = new Scanner(System.in);
		
		int N = in.nextInt();
		int[][] A = new int[2][N+1];
		for(int i = 1; i <= N; i++){
			A[0][i] = A[0][i-1] + in.nextInt();
		}
		for(int i = 1; i <= N; i++){
			A[1][i] = A[1][i-1] + in.nextInt();
		}
		
		int max = 0;
		for(int i = 1; i <= N; i++){
			int m = (A[0][i] - A[0][0]) + (A[1][N] - A[1][i-1]);
			//System.out.println((A[0][i] - A[0][0]) + " " + (A[1][N] - A[1][i-1]));
			max = Math.max(m, max);
		}
		
		System.out.println(max);
	}
}
