import java.util.*;
public class Main {
  	public static void main(String[] args) {
//		2xNのマス目
//		1,2,3,4..
//		5,6,7,8..
//		スタートは(1, 1)


		Scanner sc = new Scanner(System.in);
      	int N = sc.nextInt();
//      (2,N)
      	ArrayList<Integer> masu1 = new ArrayList<Integer>();
      	ArrayList<Integer> masu2 = new ArrayList<Integer>();
      	for(int i = 0; i < N; i++) {
      		 masu1.add(sc.nextInt());
      	}

      	for(int i = 0; i < N; i++) {
     		 masu2.add(sc.nextInt());
     	}
    	ArrayList<Integer> ans = new ArrayList<Integer>();
      	for (int i = 1; i < N; i++) {
      		int total = 0;
      		int count = i;
      		while (count != 0) {
      			total += masu1.get(count - 1);
      			count--;
      		}
      		for (int j = N; j >= i; j--) {
      			total += masu2.get(j - 1);
      		}
      		ans.add(total);
      	}
      	int total = 0;
      	for(int i = 0; i < N; i++) {
    		 total += masu1.get(i);
    	}
      	total += masu2.get(N-1);
      	ans.add(total);

      	System.out.println(Collections.max(ans));
	}
} import java.util.*; util.* java public class Main {
  	public static void main(String[] args) {
//		2xNのマス目
//		1,2,3,4..
//		5,6,7,8..
//		スタートは(1, 1)


		Scanner sc = new Scanner(System.in);
      	int N = sc.nextInt();
//      (2,N)
      	ArrayList<Integer> masu1 = new ArrayList<Integer>();
      	ArrayList<Integer> masu2 = new ArrayList<Integer>();
      	for(int i = 0; i < N; i++) {
      		 masu1.add(sc.nextInt());
      	}

      	for(int i = 0; i < N; i++) {
     		 masu2.add(sc.nextInt());
     	}
    	ArrayList<Integer> ans = new ArrayList<Integer>();
      	for (int i = 1; i < N; i++) {
      		int total = 0;
      		int count = i;
      		while (count != 0) {
      			total += masu1.get(count - 1);
      			count--;
      		}
      		for (int j = N; j >= i; j--) {
      			total += masu2.get(j - 1);
      		}
      		ans.add(total);
      	}
      	int total = 0;
      	for(int i = 0; i < N; i++) {
    		 total += masu1.get(i);
    	}
      	total += masu2.get(N-1);
      	ans.add(total);

      	System.out.println(Collections.max(ans));
	}
} Main public static void main(String[] args) {
//		2xNのマス目
//		1,2,3,4..
//		5,6,7,8..
//		スタートは(1, 1)


		Scanner sc = new Scanner(System.in);
      	int N = sc.nextInt();
//      (2,N)
      	ArrayList<Integer> masu1 = new ArrayList<Integer>();
      	ArrayList<Integer> masu2 = new ArrayList<Integer>();
      	for(int i = 0; i < N; i++) {
      		 masu1.add(sc.nextInt());
      	}

      	for(int i = 0; i < N; i++) {
     		 masu2.add(sc.nextInt());
     	}
    	ArrayList<Integer> ans = new ArrayList<Integer>();
      	for (int i = 1; i < N; i++) {
      		int total = 0;
      		int count = i;
      		while (count != 0) {
      			total += masu1.get(count - 1);
      			count--;
      		}
      		for (int j = N; j >= i; j--) {
      			total += masu2.get(j - 1);
      		}
      		ans.add(total);
      	}
      	int total = 0;
      	for(int i = 0; i < N; i++) {
    		 total += masu1.get(i);
    	}
      	total += masu2.get(N-1);
      	ans.add(total);

      	System.out.println(Collections.max(ans));
	} main {
//		2xNのマス目
//		1,2,3,4..
//		5,6,7,8..
//		スタートは(1, 1)


		Scanner sc = new Scanner(System.in);
      	int N = sc.nextInt();
//      (2,N)
      	ArrayList<Integer> masu1 = new ArrayList<Integer>();
      	ArrayList<Integer> masu2 = new ArrayList<Integer>();
      	for(int i = 0; i < N; i++) {
      		 masu1.add(sc.nextInt());
      	}

      	for(int i = 0; i < N; i++) {
     		 masu2.add(sc.nextInt());
     	}
    	ArrayList<Integer> ans = new ArrayList<Integer>();
      	for (int i = 1; i < N; i++) {
      		int total = 0;
      		int count = i;
      		while (count != 0) {
      			total += masu1.get(count - 1);
      			count--;
      		}
      		for (int j = N; j >= i; j--) {
      			total += masu2.get(j - 1);
      		}
      		ans.add(total);
      	}
      	int total = 0;
      	for(int i = 0; i < N; i++) {
    		 total += masu1.get(i);
    	}
      	total += masu2.get(N-1);
      	ans.add(total);

      	System.out.println(Collections.max(ans));
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc ArrayList<Integer> masu1 = new ArrayList<Integer>(); masu1 new ArrayList<Integer>() ArrayList<Integer> masu2 = new ArrayList<Integer>(); masu2 new ArrayList<Integer>() for(int i = 0; i < N; i++) {
      		 masu1.add(sc.nextInt());
      	} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      		 masu1.add(sc.nextInt());
      	} {
      		 masu1.add(sc.nextInt());
      	} masu1.add(sc.nextInt()) masu1.add masu1 sc.nextInt() sc.nextInt sc for(int i = 0; i < N; i++) {
     		 masu2.add(sc.nextInt());
     	} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
     		 masu2.add(sc.nextInt());
     	} {
     		 masu2.add(sc.nextInt());
     	} masu2.add(sc.nextInt()) masu2.add masu2 sc.nextInt() sc.nextInt sc ArrayList<Integer> ans = new ArrayList<Integer>(); ans new ArrayList<Integer>() for (int i = 1; i < N; i++) {
      		int total = 0;
      		int count = i;
      		while (count != 0) {
      			total += masu1.get(count - 1);
      			count--;
      		}
      		for (int j = N; j >= i; j--) {
      			total += masu2.get(j - 1);
      		}
      		ans.add(total);
      	} int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
      		int total = 0;
      		int count = i;
      		while (count != 0) {
      			total += masu1.get(count - 1);
      			count--;
      		}
      		for (int j = N; j >= i; j--) {
      			total += masu2.get(j - 1);
      		}
      		ans.add(total);
      	} {
      		int total = 0;
      		int count = i;
      		while (count != 0) {
      			total += masu1.get(count - 1);
      			count--;
      		}
      		for (int j = N; j >= i; j--) {
      			total += masu2.get(j - 1);
      		}
      		ans.add(total);
      	} int total = 0; total 0 int count = i; count i while (count != 0) {
      			total += masu1.get(count - 1);
      			count--;
      		} count != 0 count 0 {
      			total += masu1.get(count - 1);
      			count--;
      		} total += masu1.get(count - 1) total masu1.get(count - 1) masu1.get masu1 count - 1 count 1 count-- count for (int j = N; j >= i; j--) {
      			total += masu2.get(j - 1);
      		} int j = N; int j = N; j N j >= i j i j-- j-- j {
      			total += masu2.get(j - 1);
      		} {
      			total += masu2.get(j - 1);
      		} total += masu2.get(j - 1) total masu2.get(j - 1) masu2.get masu2 j - 1 j 1 ans.add(total) ans.add ans total int total = 0; total 0 for(int i = 0; i < N; i++) {
    		 total += masu1.get(i);
    	} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
    		 total += masu1.get(i);
    	} {
    		 total += masu1.get(i);
    	} total += masu1.get(i) total masu1.get(i) masu1.get masu1 i total += masu2.get(N-1) total masu2.get(N-1) masu2.get masu2 N-1 N 1 ans.add(total) ans.add ans total System.out.println(Collections.max(ans)) System.out.println System.out System System.out Collections.max(ans) Collections.max Collections ans String[] args args public class Main {
  	public static void main(String[] args) {
//		2xNのマス目
//		1,2,3,4..
//		5,6,7,8..
//		スタートは(1, 1)


		Scanner sc = new Scanner(System.in);
      	int N = sc.nextInt();
//      (2,N)
      	ArrayList<Integer> masu1 = new ArrayList<Integer>();
      	ArrayList<Integer> masu2 = new ArrayList<Integer>();
      	for(int i = 0; i < N; i++) {
      		 masu1.add(sc.nextInt());
      	}

      	for(int i = 0; i < N; i++) {
     		 masu2.add(sc.nextInt());
     	}
    	ArrayList<Integer> ans = new ArrayList<Integer>();
      	for (int i = 1; i < N; i++) {
      		int total = 0;
      		int count = i;
      		while (count != 0) {
      			total += masu1.get(count - 1);
      			count--;
      		}
      		for (int j = N; j >= i; j--) {
      			total += masu2.get(j - 1);
      		}
      		ans.add(total);
      	}
      	int total = 0;
      	for(int i = 0; i < N; i++) {
    		 total += masu1.get(i);
    	}
      	total += masu2.get(N-1);
      	ans.add(total);

      	System.out.println(Collections.max(ans));
	}
} public class Main {
  	public static void main(String[] args) {
//		2xNのマス目
//		1,2,3,4..
//		5,6,7,8..
//		スタートは(1, 1)


		Scanner sc = new Scanner(System.in);
      	int N = sc.nextInt();
//      (2,N)
      	ArrayList<Integer> masu1 = new ArrayList<Integer>();
      	ArrayList<Integer> masu2 = new ArrayList<Integer>();
      	for(int i = 0; i < N; i++) {
      		 masu1.add(sc.nextInt());
      	}

      	for(int i = 0; i < N; i++) {
     		 masu2.add(sc.nextInt());
     	}
    	ArrayList<Integer> ans = new ArrayList<Integer>();
      	for (int i = 1; i < N; i++) {
      		int total = 0;
      		int count = i;
      		while (count != 0) {
      			total += masu1.get(count - 1);
      			count--;
      		}
      		for (int j = N; j >= i; j--) {
      			total += masu2.get(j - 1);
      		}
      		ans.add(total);
      	}
      	int total = 0;
      	for(int i = 0; i < N; i++) {
    		 total += masu1.get(i);
    	}
      	total += masu2.get(N-1);
      	ans.add(total);

      	System.out.println(Collections.max(ans));
	}
} Main
import java.util.*;
public class Main {
  	public static void main(String[] args) {
//		2xNのマス目
//		1,2,3,4..
//		5,6,7,8..
//		スタートは(1, 1)


		Scanner sc = new Scanner(System.in);
      	int N = sc.nextInt();
//      (2,N)
      	ArrayList<Integer> masu1 = new ArrayList<Integer>();
      	ArrayList<Integer> masu2 = new ArrayList<Integer>();
      	for(int i = 0; i < N; i++) {
      		 masu1.add(sc.nextInt());
      	}

      	for(int i = 0; i < N; i++) {
     		 masu2.add(sc.nextInt());
     	}
    	ArrayList<Integer> ans = new ArrayList<Integer>();
      	for (int i = 1; i < N; i++) {
      		int total = 0;
      		int count = i;
      		while (count != 0) {
      			total += masu1.get(count - 1);
      			count--;
      		}
      		for (int j = N; j >= i; j--) {
      			total += masu2.get(j - 1);
      		}
      		ans.add(total);
      	}
      	int total = 0;
      	for(int i = 0; i < N; i++) {
    		 total += masu1.get(i);
    	}
      	total += masu2.get(N-1);
      	ans.add(total);

      	System.out.println(Collections.max(ans));
	}
}
