import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	static long[][] A ;
	static int N;
	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		N = Integer.parseInt(W);


		A = new long[2][N];

		for(int k=0;k<2;k++){
			W = in.readLine();
			String[] Ws = W.split(" ");

			for (int i = 0; i < Ws.length; i++) {

				A[k][i] = Long.parseLong(Ws[i]);
			}
		}

		System.out.println(calc(0,0,0));

	}

	public static long calc(int i,int j,long sum){
		if(i==1 && j==N-1){
			return sum+A[i][j];
		}
		if(i==1){
			return calc(i,j+1,sum+A[i][j]);
		}else if(j==N-1){
			return calc(i+1,j,sum+A[i][j]);
		}else{
			return Math.max(calc(i+1,j,sum+A[i][j]), calc(i,j+1,sum+A[i][j]));
		}
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	static long[][] A ;
	static int N;
	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		N = Integer.parseInt(W);


		A = new long[2][N];

		for(int k=0;k<2;k++){
			W = in.readLine();
			String[] Ws = W.split(" ");

			for (int i = 0; i < Ws.length; i++) {

				A[k][i] = Long.parseLong(Ws[i]);
			}
		}

		System.out.println(calc(0,0,0));

	}

	public static long calc(int i,int j,long sum){
		if(i==1 && j==N-1){
			return sum+A[i][j];
		}
		if(i==1){
			return calc(i,j+1,sum+A[i][j]);
		}else if(j==N-1){
			return calc(i+1,j,sum+A[i][j]);
		}else{
			return Math.max(calc(i+1,j,sum+A[i][j]), calc(i,j+1,sum+A[i][j]));
		}
	}

} Main static long[][] A ; A static int N; N public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		N = Integer.parseInt(W);


		A = new long[2][N];

		for(int k=0;k<2;k++){
			W = in.readLine();
			String[] Ws = W.split(" ");

			for (int i = 0; i < Ws.length; i++) {

				A[k][i] = Long.parseLong(Ws[i]);
			}
		}

		System.out.println(calc(0,0,0));

	} main {
		// TODO 自動生成されたメソッド・スタブ

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		N = Integer.parseInt(W);


		A = new long[2][N];

		for(int k=0;k<2;k++){
			W = in.readLine();
			String[] Ws = W.split(" ");

			for (int i = 0; i < Ws.length; i++) {

				A[k][i] = Long.parseLong(Ws[i]);
			}
		}

		System.out.println(calc(0,0,0));

	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String W = in.readLine(); W in.readLine() in.readLine in N = Integer.parseInt(W) N Integer.parseInt(W) Integer.parseInt Integer W A = new long[2][N] A new long[2][N] 2 N for(int k=0;k<2;k++){
			W = in.readLine();
			String[] Ws = W.split(" ");

			for (int i = 0; i < Ws.length; i++) {

				A[k][i] = Long.parseLong(Ws[i]);
			}
		} int k=0; int k=0; k 0 k<2 k 2 k++ k++ k {
			W = in.readLine();
			String[] Ws = W.split(" ");

			for (int i = 0; i < Ws.length; i++) {

				A[k][i] = Long.parseLong(Ws[i]);
			}
		} {
			W = in.readLine();
			String[] Ws = W.split(" ");

			for (int i = 0; i < Ws.length; i++) {

				A[k][i] = Long.parseLong(Ws[i]);
			}
		} W = in.readLine() W in.readLine() in.readLine in String[] Ws = W.split(" "); Ws W.split(" ") W.split W " " for (int i = 0; i < Ws.length; i++) {

				A[k][i] = Long.parseLong(Ws[i]);
			} int i = 0; int i = 0; i 0 i < Ws.length i Ws.length Ws Ws.length i++ i++ i {

				A[k][i] = Long.parseLong(Ws[i]);
			} {

				A[k][i] = Long.parseLong(Ws[i]);
			} A[k][i] = Long.parseLong(Ws[i]) A[k][i] A[k] A k i Long.parseLong(Ws[i]) Long.parseLong Long Ws[i] Ws i System.out.println(calc(0,0,0)) System.out.println System.out System System.out calc(0,0,0) calc 0 0 0 String[] args args public static long calc(int i,int j,long sum){
		if(i==1 && j==N-1){
			return sum+A[i][j];
		}
		if(i==1){
			return calc(i,j+1,sum+A[i][j]);
		}else if(j==N-1){
			return calc(i+1,j,sum+A[i][j]);
		}else{
			return Math.max(calc(i+1,j,sum+A[i][j]), calc(i,j+1,sum+A[i][j]));
		}
	} calc {
		if(i==1 && j==N-1){
			return sum+A[i][j];
		}
		if(i==1){
			return calc(i,j+1,sum+A[i][j]);
		}else if(j==N-1){
			return calc(i+1,j,sum+A[i][j]);
		}else{
			return Math.max(calc(i+1,j,sum+A[i][j]), calc(i,j+1,sum+A[i][j]));
		}
	} if(i==1 && j==N-1){
			return sum+A[i][j];
		} i==1 && j==N-1 i==1 i 1 j==N-1 j N-1 N 1 {
			return sum+A[i][j];
		} return sum+A[i][j]; sum+A[i][j] sum A[i][j] A[i] A i j if(i==1){
			return calc(i,j+1,sum+A[i][j]);
		}else if(j==N-1){
			return calc(i+1,j,sum+A[i][j]);
		}else{
			return Math.max(calc(i+1,j,sum+A[i][j]), calc(i,j+1,sum+A[i][j]));
		} i==1 i 1 {
			return calc(i,j+1,sum+A[i][j]);
		} return calc(i,j+1,sum+A[i][j]); calc(i,j+1,sum+A[i][j]) calc i j+1 j 1 sum+A[i][j] sum A[i][j] A[i] A i j if(j==N-1){
			return calc(i+1,j,sum+A[i][j]);
		}else{
			return Math.max(calc(i+1,j,sum+A[i][j]), calc(i,j+1,sum+A[i][j]));
		} j==N-1 j N-1 N 1 {
			return calc(i+1,j,sum+A[i][j]);
		} return calc(i+1,j,sum+A[i][j]); calc(i+1,j,sum+A[i][j]) calc i+1 i 1 j sum+A[i][j] sum A[i][j] A[i] A i j {
			return Math.max(calc(i+1,j,sum+A[i][j]), calc(i,j+1,sum+A[i][j]));
		} return Math.max(calc(i+1,j,sum+A[i][j]), calc(i,j+1,sum+A[i][j])); Math.max(calc(i+1,j,sum+A[i][j]), calc(i,j+1,sum+A[i][j])) Math.max Math calc(i+1,j,sum+A[i][j]) calc i+1 i 1 j sum+A[i][j] sum A[i][j] A[i] A i j calc(i,j+1,sum+A[i][j]) calc i j+1 j 1 sum+A[i][j] sum A[i][j] A[i] A i j int i i int j j long sum sum public class Main {

	static long[][] A ;
	static int N;
	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		N = Integer.parseInt(W);


		A = new long[2][N];

		for(int k=0;k<2;k++){
			W = in.readLine();
			String[] Ws = W.split(" ");

			for (int i = 0; i < Ws.length; i++) {

				A[k][i] = Long.parseLong(Ws[i]);
			}
		}

		System.out.println(calc(0,0,0));

	}

	public static long calc(int i,int j,long sum){
		if(i==1 && j==N-1){
			return sum+A[i][j];
		}
		if(i==1){
			return calc(i,j+1,sum+A[i][j]);
		}else if(j==N-1){
			return calc(i+1,j,sum+A[i][j]);
		}else{
			return Math.max(calc(i+1,j,sum+A[i][j]), calc(i,j+1,sum+A[i][j]));
		}
	}

} public class Main {

	static long[][] A ;
	static int N;
	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		N = Integer.parseInt(W);


		A = new long[2][N];

		for(int k=0;k<2;k++){
			W = in.readLine();
			String[] Ws = W.split(" ");

			for (int i = 0; i < Ws.length; i++) {

				A[k][i] = Long.parseLong(Ws[i]);
			}
		}

		System.out.println(calc(0,0,0));

	}

	public static long calc(int i,int j,long sum){
		if(i==1 && j==N-1){
			return sum+A[i][j];
		}
		if(i==1){
			return calc(i,j+1,sum+A[i][j]);
		}else if(j==N-1){
			return calc(i+1,j,sum+A[i][j]);
		}else{
			return Math.max(calc(i+1,j,sum+A[i][j]), calc(i,j+1,sum+A[i][j]));
		}
	}

} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	static long[][] A ;
	static int N;
	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		N = Integer.parseInt(W);


		A = new long[2][N];

		for(int k=0;k<2;k++){
			W = in.readLine();
			String[] Ws = W.split(" ");

			for (int i = 0; i < Ws.length; i++) {

				A[k][i] = Long.parseLong(Ws[i]);
			}
		}

		System.out.println(calc(0,0,0));

	}

	public static long calc(int i,int j,long sum){
		if(i==1 && j==N-1){
			return sum+A[i][j];
		}
		if(i==1){
			return calc(i,j+1,sum+A[i][j]);
		}else if(j==N-1){
			return calc(i+1,j,sum+A[i][j]);
		}else{
			return Math.max(calc(i+1,j,sum+A[i][j]), calc(i,j+1,sum+A[i][j]));
		}
	}

}
