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