import java.util.*;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in); 
		
		int N = sc.nextInt();
		int[] array1 = new int[N];
		int[] array2 = new int[N];
		for(int i=0; i<N; i++)
			array1[i] = sc.nextInt();
		for(int i=0; i<N; i++)
			array2[i] = sc.nextInt();
		
		int candies = 0;
		int total1 = 0;
		int total2 = 0;
		int total3 = 0;

		for(int i=0; i<N; i++) {
			total1 += array1[i];
			total2 = 0;
			for(int j=i; j<N; j++) {
				total2 += array2[j];
			}
			total3 = total1 + total2;
			if(candies < total3)
				candies = total3;
		}
		System.out.println(candies);
	}

} 
    import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in); 
		
		int N = sc.nextInt();
		int[] array1 = new int[N];
		int[] array2 = new int[N];
		for(int i=0; i<N; i++)
			array1[i] = sc.nextInt();
		for(int i=0; i<N; i++)
			array2[i] = sc.nextInt();
		
		int candies = 0;
		int total1 = 0;
		int total2 = 0;
		int total3 = 0;

		for(int i=0; i<N; i++) {
			total1 += array1[i];
			total2 = 0;
			for(int j=i; j<N; j++) {
				total2 += array2[j];
			}
			total3 = total1 + total2;
			if(candies < total3)
				candies = total3;
		}
		System.out.println(candies);
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in); 
		
		int N = sc.nextInt();
		int[] array1 = new int[N];
		int[] array2 = new int[N];
		for(int i=0; i<N; i++)
			array1[i] = sc.nextInt();
		for(int i=0; i<N; i++)
			array2[i] = sc.nextInt();
		
		int candies = 0;
		int total1 = 0;
		int total2 = 0;
		int total3 = 0;

		for(int i=0; i<N; i++) {
			total1 += array1[i];
			total2 = 0;
			for(int j=i; j<N; j++) {
				total2 += array2[j];
			}
			total3 = total1 + total2;
			if(candies < total3)
				candies = total3;
		}
		System.out.println(candies);
	} main {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in); 
		
		int N = sc.nextInt();
		int[] array1 = new int[N];
		int[] array2 = new int[N];
		for(int i=0; i<N; i++)
			array1[i] = sc.nextInt();
		for(int i=0; i<N; i++)
			array2[i] = sc.nextInt();
		
		int candies = 0;
		int total1 = 0;
		int total2 = 0;
		int total3 = 0;

		for(int i=0; i<N; i++) {
			total1 += array1[i];
			total2 = 0;
			for(int j=i; j<N; j++) {
				total2 += array2[j];
			}
			total3 = total1 + total2;
			if(candies < total3)
				candies = total3;
		}
		System.out.println(candies);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] array1 = new int[N]; array1 new int[N] N int[] array2 = new int[N]; array2 new int[N] N for(int i=0; i<N; i++)
			array1[i] = sc.nextInt(); int i=0; int i=0; i 0 i<N i N i++ i++ i array1[i] = sc.nextInt(); array1[i] = sc.nextInt() array1[i] array1 i sc.nextInt() sc.nextInt sc for(int i=0; i<N; i++)
			array2[i] = sc.nextInt(); int i=0; int i=0; i 0 i<N i N i++ i++ i array2[i] = sc.nextInt(); array2[i] = sc.nextInt() array2[i] array2 i sc.nextInt() sc.nextInt sc int candies = 0; candies 0 int total1 = 0; total1 0 int total2 = 0; total2 0 int total3 = 0; total3 0 for(int i=0; i<N; i++) {
			total1 += array1[i];
			total2 = 0;
			for(int j=i; j<N; j++) {
				total2 += array2[j];
			}
			total3 = total1 + total2;
			if(candies < total3)
				candies = total3;
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			total1 += array1[i];
			total2 = 0;
			for(int j=i; j<N; j++) {
				total2 += array2[j];
			}
			total3 = total1 + total2;
			if(candies < total3)
				candies = total3;
		} {
			total1 += array1[i];
			total2 = 0;
			for(int j=i; j<N; j++) {
				total2 += array2[j];
			}
			total3 = total1 + total2;
			if(candies < total3)
				candies = total3;
		} total1 += array1[i] total1 array1[i] array1 i total2 = 0 total2 0 for(int j=i; j<N; j++) {
				total2 += array2[j];
			} int j=i; int j=i; j i j<N j N j++ j++ j {
				total2 += array2[j];
			} {
				total2 += array2[j];
			} total2 += array2[j] total2 array2[j] array2 j total3 = total1 + total2 total3 total1 + total2 total1 total2 if(candies < total3)
				candies = total3; candies < total3 candies total3 candies = total3 candies total3 System.out.println(candies) System.out.println System.out System System.out candies String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in); 
		
		int N = sc.nextInt();
		int[] array1 = new int[N];
		int[] array2 = new int[N];
		for(int i=0; i<N; i++)
			array1[i] = sc.nextInt();
		for(int i=0; i<N; i++)
			array2[i] = sc.nextInt();
		
		int candies = 0;
		int total1 = 0;
		int total2 = 0;
		int total3 = 0;

		for(int i=0; i<N; i++) {
			total1 += array1[i];
			total2 = 0;
			for(int j=i; j<N; j++) {
				total2 += array2[j];
			}
			total3 = total1 + total2;
			if(candies < total3)
				candies = total3;
		}
		System.out.println(candies);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in); 
		
		int N = sc.nextInt();
		int[] array1 = new int[N];
		int[] array2 = new int[N];
		for(int i=0; i<N; i++)
			array1[i] = sc.nextInt();
		for(int i=0; i<N; i++)
			array2[i] = sc.nextInt();
		
		int candies = 0;
		int total1 = 0;
		int total2 = 0;
		int total3 = 0;

		for(int i=0; i<N; i++) {
			total1 += array1[i];
			total2 = 0;
			for(int j=i; j<N; j++) {
				total2 += array2[j];
			}
			total3 = total1 + total2;
			if(candies < total3)
				candies = total3;
		}
		System.out.println(candies);
	}

} Main
import java.util.*;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in); 
		
		int N = sc.nextInt();
		int[] array1 = new int[N];
		int[] array2 = new int[N];
		for(int i=0; i<N; i++)
			array1[i] = sc.nextInt();
		for(int i=0; i<N; i++)
			array2[i] = sc.nextInt();
		
		int candies = 0;
		int total1 = 0;
		int total2 = 0;
		int total3 = 0;

		for(int i=0; i<N; i++) {
			total1 += array1[i];
			total2 = 0;
			for(int j=i; j<N; j++) {
				total2 += array2[j];
			}
			total3 = total1 + total2;
			if(candies < total3)
				candies = total3;
		}
		System.out.println(candies);
	}

} 
   