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 = 0;
        int total = 0;
        for(int i=0; i<N; i++){
          for(int z=0; z<=i; z++) total += a1[z];
          for(int j=i; j<N; j++) total += a2[j];
          if(max < total) max = total;
          total = 0;
        }
        System.out.print(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[] 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 = 0;
        int total = 0;
        for(int i=0; i<N; i++){
          for(int z=0; z<=i; z++) total += a1[z];
          for(int j=i; j<N; j++) total += a2[j];
          if(max < total) max = total;
          total = 0;
        }
        System.out.print(max);
        
}
} 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 = 0;
        int total = 0;
        for(int i=0; i<N; i++){
          for(int z=0; z<=i; z++) total += a1[z];
          for(int j=i; j<N; j++) total += a2[j];
          if(max < total) max = total;
          total = 0;
        }
        System.out.print(max);
        
} 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 = 0;
        int total = 0;
        for(int i=0; i<N; i++){
          for(int z=0; z<=i; z++) total += a1[z];
          for(int j=i; j<N; j++) total += a2[j];
          if(max < total) max = total;
          total = 0;
        }
        System.out.print(max);
        
} 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 = 0; max 0 int total = 0; total 0 for(int i=0; i<N; i++){
          for(int z=0; z<=i; z++) total += a1[z];
          for(int j=i; j<N; j++) total += a2[j];
          if(max < total) max = total;
          total = 0;
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
          for(int z=0; z<=i; z++) total += a1[z];
          for(int j=i; j<N; j++) total += a2[j];
          if(max < total) max = total;
          total = 0;
        } {
          for(int z=0; z<=i; z++) total += a1[z];
          for(int j=i; j<N; j++) total += a2[j];
          if(max < total) max = total;
          total = 0;
        } for(int z=0; z<=i; z++) total += a1[z]; int z=0; int z=0; z 0 z<=i z i z++ z++ z total += a1[z]; total += a1[z] total a1[z] a1 z for(int j=i; j<N; j++) total += a2[j]; int j=i; int j=i; j i j<N j N j++ j++ j total += a2[j]; total += a2[j] total a2[j] a2 j if(max < total) max = total; max < total max total max = total max total total = 0 total 0 System.out.print(max) System.out.print 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[] 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 = 0;
        int total = 0;
        for(int i=0; i<N; i++){
          for(int z=0; z<=i; z++) total += a1[z];
          for(int j=i; j<N; j++) total += a2[j];
          if(max < total) max = total;
          total = 0;
        }
        System.out.print(max);
        
}
} 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 = 0;
        int total = 0;
        for(int i=0; i<N; i++){
          for(int z=0; z<=i; z++) total += a1[z];
          for(int j=i; j<N; j++) total += a2[j];
          if(max < total) max = total;
          total = 0;
        }
        System.out.print(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[] 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 = 0;
        int total = 0;
        for(int i=0; i<N; i++){
          for(int z=0; z<=i; z++) total += a1[z];
          for(int j=i; j<N; j++) total += a2[j];
          if(max < total) max = total;
          total = 0;
        }
        System.out.print(max);
        
}
}
