import java.util.*;

public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	int N = sc.nextInt();
      	int s1[] = new int[N];
      	int s2[] = new int[N];
        
		int tmp1 = 0;
      	for(int i = 0; i < N; i++){
          int a1 = sc.nextInt();
          s1[i] = a1 + tmp1;
          //System.out.println(s1[i]);
          tmp1 += a1;
        }
      	int tmp2 = 0;
      	for(int i = 0; i < N; i++){
          int a2 = sc.nextInt();
          s2[i] = a2 + tmp2;
          tmp2 += a2;
        }
      int max = 0;
      if(N != 1){
      	max = s1[N - 1] + (s2[N - 1] - s2[N - 2]);
      }else {
      	max = s1[N - 1] + s2[N - 1];
      }
      //System.out.println(max);
      int total = 0;
      for(int i = 0; i < N; i++){
        if(i == 0){
          	total = s1[i] + s2[N - 1];
        }else{
        	total = s1[i] + (s2[N - 1] - s2[i - 1]);
        }
        if(max <= total){
        	max = total;
        }
        total = 0;
      }
      System.out.println(max);
    }
} 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 s1[] = new int[N];
      	int s2[] = new int[N];
        
		int tmp1 = 0;
      	for(int i = 0; i < N; i++){
          int a1 = sc.nextInt();
          s1[i] = a1 + tmp1;
          //System.out.println(s1[i]);
          tmp1 += a1;
        }
      	int tmp2 = 0;
      	for(int i = 0; i < N; i++){
          int a2 = sc.nextInt();
          s2[i] = a2 + tmp2;
          tmp2 += a2;
        }
      int max = 0;
      if(N != 1){
      	max = s1[N - 1] + (s2[N - 1] - s2[N - 2]);
      }else {
      	max = s1[N - 1] + s2[N - 1];
      }
      //System.out.println(max);
      int total = 0;
      for(int i = 0; i < N; i++){
        if(i == 0){
          	total = s1[i] + s2[N - 1];
        }else{
        	total = s1[i] + (s2[N - 1] - s2[i - 1]);
        }
        if(max <= total){
        	max = total;
        }
        total = 0;
      }
      System.out.println(max);
    }
} Main public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	int N = sc.nextInt();
      	int s1[] = new int[N];
      	int s2[] = new int[N];
        
		int tmp1 = 0;
      	for(int i = 0; i < N; i++){
          int a1 = sc.nextInt();
          s1[i] = a1 + tmp1;
          //System.out.println(s1[i]);
          tmp1 += a1;
        }
      	int tmp2 = 0;
      	for(int i = 0; i < N; i++){
          int a2 = sc.nextInt();
          s2[i] = a2 + tmp2;
          tmp2 += a2;
        }
      int max = 0;
      if(N != 1){
      	max = s1[N - 1] + (s2[N - 1] - s2[N - 2]);
      }else {
      	max = s1[N - 1] + s2[N - 1];
      }
      //System.out.println(max);
      int total = 0;
      for(int i = 0; i < N; i++){
        if(i == 0){
          	total = s1[i] + s2[N - 1];
        }else{
        	total = s1[i] + (s2[N - 1] - s2[i - 1]);
        }
        if(max <= total){
        	max = total;
        }
        total = 0;
      }
      System.out.println(max);
    } main {
    	Scanner sc = new Scanner(System.in);
      	int N = sc.nextInt();
      	int s1[] = new int[N];
      	int s2[] = new int[N];
        
		int tmp1 = 0;
      	for(int i = 0; i < N; i++){
          int a1 = sc.nextInt();
          s1[i] = a1 + tmp1;
          //System.out.println(s1[i]);
          tmp1 += a1;
        }
      	int tmp2 = 0;
      	for(int i = 0; i < N; i++){
          int a2 = sc.nextInt();
          s2[i] = a2 + tmp2;
          tmp2 += a2;
        }
      int max = 0;
      if(N != 1){
      	max = s1[N - 1] + (s2[N - 1] - s2[N - 2]);
      }else {
      	max = s1[N - 1] + s2[N - 1];
      }
      //System.out.println(max);
      int total = 0;
      for(int i = 0; i < N; i++){
        if(i == 0){
          	total = s1[i] + s2[N - 1];
        }else{
        	total = s1[i] + (s2[N - 1] - s2[i - 1]);
        }
        if(max <= total){
        	max = total;
        }
        total = 0;
      }
      System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int s1[] = new int[N]; s1 new int[N] N int s2[] = new int[N]; s2 new int[N] N int tmp1 = 0; tmp1 0 for(int i = 0; i < N; i++){
          int a1 = sc.nextInt();
          s1[i] = a1 + tmp1;
          //System.out.println(s1[i]);
          tmp1 += a1;
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
          int a1 = sc.nextInt();
          s1[i] = a1 + tmp1;
          //System.out.println(s1[i]);
          tmp1 += a1;
        } {
          int a1 = sc.nextInt();
          s1[i] = a1 + tmp1;
          //System.out.println(s1[i]);
          tmp1 += a1;
        } int a1 = sc.nextInt(); a1 sc.nextInt() sc.nextInt sc s1[i] = a1 + tmp1 s1[i] s1 i a1 + tmp1 a1 tmp1 tmp1 += a1 tmp1 a1 int tmp2 = 0; tmp2 0 for(int i = 0; i < N; i++){
          int a2 = sc.nextInt();
          s2[i] = a2 + tmp2;
          tmp2 += a2;
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
          int a2 = sc.nextInt();
          s2[i] = a2 + tmp2;
          tmp2 += a2;
        } {
          int a2 = sc.nextInt();
          s2[i] = a2 + tmp2;
          tmp2 += a2;
        } int a2 = sc.nextInt(); a2 sc.nextInt() sc.nextInt sc s2[i] = a2 + tmp2 s2[i] s2 i a2 + tmp2 a2 tmp2 tmp2 += a2 tmp2 a2 int max = 0; max 0 if(N != 1){
      	max = s1[N - 1] + (s2[N - 1] - s2[N - 2]);
      }else {
      	max = s1[N - 1] + s2[N - 1];
      } N != 1 N 1 {
      	max = s1[N - 1] + (s2[N - 1] - s2[N - 2]);
      } max = s1[N - 1] + (s2[N - 1] - s2[N - 2]) max s1[N - 1] + (s2[N - 1] - s2[N - 2]) s1[N - 1] s1 N - 1 N 1 (s2[N - 1] - s2[N - 2]) s2[N - 1] s2 N - 1 N 1 s2[N - 2] s2 N - 2 N 2 {
      	max = s1[N - 1] + s2[N - 1];
      } max = s1[N - 1] + s2[N - 1] max s1[N - 1] + s2[N - 1] s1[N - 1] s1 N - 1 N 1 s2[N - 1] s2 N - 1 N 1 int total = 0; total 0 for(int i = 0; i < N; i++){
        if(i == 0){
          	total = s1[i] + s2[N - 1];
        }else{
        	total = s1[i] + (s2[N - 1] - s2[i - 1]);
        }
        if(max <= total){
        	max = total;
        }
        total = 0;
      } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
        if(i == 0){
          	total = s1[i] + s2[N - 1];
        }else{
        	total = s1[i] + (s2[N - 1] - s2[i - 1]);
        }
        if(max <= total){
        	max = total;
        }
        total = 0;
      } {
        if(i == 0){
          	total = s1[i] + s2[N - 1];
        }else{
        	total = s1[i] + (s2[N - 1] - s2[i - 1]);
        }
        if(max <= total){
        	max = total;
        }
        total = 0;
      } if(i == 0){
          	total = s1[i] + s2[N - 1];
        }else{
        	total = s1[i] + (s2[N - 1] - s2[i - 1]);
        } i == 0 i 0 {
          	total = s1[i] + s2[N - 1];
        } total = s1[i] + s2[N - 1] total s1[i] + s2[N - 1] s1[i] s1 i s2[N - 1] s2 N - 1 N 1 {
        	total = s1[i] + (s2[N - 1] - s2[i - 1]);
        } total = s1[i] + (s2[N - 1] - s2[i - 1]) total s1[i] + (s2[N - 1] - s2[i - 1]) s1[i] s1 i (s2[N - 1] - s2[i - 1]) s2[N - 1] s2 N - 1 N 1 s2[i - 1] s2 i - 1 i 1 if(max <= total){
        	max = total;
        } max <= total max total {
        	max = total;
        } max = total max total total = 0 total 0 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){
    	Scanner sc = new Scanner(System.in);
      	int N = sc.nextInt();
      	int s1[] = new int[N];
      	int s2[] = new int[N];
        
		int tmp1 = 0;
      	for(int i = 0; i < N; i++){
          int a1 = sc.nextInt();
          s1[i] = a1 + tmp1;
          //System.out.println(s1[i]);
          tmp1 += a1;
        }
      	int tmp2 = 0;
      	for(int i = 0; i < N; i++){
          int a2 = sc.nextInt();
          s2[i] = a2 + tmp2;
          tmp2 += a2;
        }
      int max = 0;
      if(N != 1){
      	max = s1[N - 1] + (s2[N - 1] - s2[N - 2]);
      }else {
      	max = s1[N - 1] + s2[N - 1];
      }
      //System.out.println(max);
      int total = 0;
      for(int i = 0; i < N; i++){
        if(i == 0){
          	total = s1[i] + s2[N - 1];
        }else{
        	total = s1[i] + (s2[N - 1] - s2[i - 1]);
        }
        if(max <= total){
        	max = total;
        }
        total = 0;
      }
      System.out.println(max);
    }
} public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	int N = sc.nextInt();
      	int s1[] = new int[N];
      	int s2[] = new int[N];
        
		int tmp1 = 0;
      	for(int i = 0; i < N; i++){
          int a1 = sc.nextInt();
          s1[i] = a1 + tmp1;
          //System.out.println(s1[i]);
          tmp1 += a1;
        }
      	int tmp2 = 0;
      	for(int i = 0; i < N; i++){
          int a2 = sc.nextInt();
          s2[i] = a2 + tmp2;
          tmp2 += a2;
        }
      int max = 0;
      if(N != 1){
      	max = s1[N - 1] + (s2[N - 1] - s2[N - 2]);
      }else {
      	max = s1[N - 1] + s2[N - 1];
      }
      //System.out.println(max);
      int total = 0;
      for(int i = 0; i < N; i++){
        if(i == 0){
          	total = s1[i] + s2[N - 1];
        }else{
        	total = s1[i] + (s2[N - 1] - s2[i - 1]);
        }
        if(max <= total){
        	max = total;
        }
        total = 0;
      }
      System.out.println(max);
    }
} Main
import java.util.*;

public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	int N = sc.nextInt();
      	int s1[] = new int[N];
      	int s2[] = new int[N];
        
		int tmp1 = 0;
      	for(int i = 0; i < N; i++){
          int a1 = sc.nextInt();
          s1[i] = a1 + tmp1;
          //System.out.println(s1[i]);
          tmp1 += a1;
        }
      	int tmp2 = 0;
      	for(int i = 0; i < N; i++){
          int a2 = sc.nextInt();
          s2[i] = a2 + tmp2;
          tmp2 += a2;
        }
      int max = 0;
      if(N != 1){
      	max = s1[N - 1] + (s2[N - 1] - s2[N - 2]);
      }else {
      	max = s1[N - 1] + s2[N - 1];
      }
      //System.out.println(max);
      int total = 0;
      for(int i = 0; i < N; i++){
        if(i == 0){
          	total = s1[i] + s2[N - 1];
        }else{
        	total = s1[i] + (s2[N - 1] - s2[i - 1]);
        }
        if(max <= total){
        	max = total;
        }
        total = 0;
      }
      System.out.println(max);
    }
}