
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
	// write your code here
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        int[] a1=new int[n];
        int[] a2=new int[n];
        for(int i=0;i<n;i++){
            a1[i]=scanner.nextInt();
        }
        for(int i=0;i<n;i++){
            a2[i]=scanner.nextInt();
        }
        int index=0;
        int max=cal(a1,a2,index);
        index++;
        for(int i=1;i<n;i++){
            int next=cal(a1,a2,index);
            if(max<next){
                max=next;
            }
            index++;
        }
        System.out.println(max);


    }
    public static int cal(int[] a1,int[] a2,int index){
        int result=0;
        for(int i=0;i<=index;i++){
            result+=a1[i];
        }
        for(int i=index;i<a1.length;i++){
            result+=a2[i];
        }
        return result;
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
	// write your code here
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        int[] a1=new int[n];
        int[] a2=new int[n];
        for(int i=0;i<n;i++){
            a1[i]=scanner.nextInt();
        }
        for(int i=0;i<n;i++){
            a2[i]=scanner.nextInt();
        }
        int index=0;
        int max=cal(a1,a2,index);
        index++;
        for(int i=1;i<n;i++){
            int next=cal(a1,a2,index);
            if(max<next){
                max=next;
            }
            index++;
        }
        System.out.println(max);


    }
    public static int cal(int[] a1,int[] a2,int index){
        int result=0;
        for(int i=0;i<=index;i++){
            result+=a1[i];
        }
        for(int i=index;i<a1.length;i++){
            result+=a2[i];
        }
        return result;
    }
} Main public static void main(String[] args) {
	// write your code here
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        int[] a1=new int[n];
        int[] a2=new int[n];
        for(int i=0;i<n;i++){
            a1[i]=scanner.nextInt();
        }
        for(int i=0;i<n;i++){
            a2[i]=scanner.nextInt();
        }
        int index=0;
        int max=cal(a1,a2,index);
        index++;
        for(int i=1;i<n;i++){
            int next=cal(a1,a2,index);
            if(max<next){
                max=next;
            }
            index++;
        }
        System.out.println(max);


    } main {
	// write your code here
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        int[] a1=new int[n];
        int[] a2=new int[n];
        for(int i=0;i<n;i++){
            a1[i]=scanner.nextInt();
        }
        for(int i=0;i<n;i++){
            a2[i]=scanner.nextInt();
        }
        int index=0;
        int max=cal(a1,a2,index);
        index++;
        for(int i=1;i<n;i++){
            int next=cal(a1,a2,index);
            if(max<next){
                max=next;
            }
            index++;
        }
        System.out.println(max);


    } Scanner scanner=new Scanner(System.in); scanner new Scanner(System.in) int n=scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner 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]=scanner.nextInt();
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            a1[i]=scanner.nextInt();
        } {
            a1[i]=scanner.nextInt();
        } a1[i]=scanner.nextInt() a1[i] a1 i scanner.nextInt() scanner.nextInt scanner for(int i=0;i<n;i++){
            a2[i]=scanner.nextInt();
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            a2[i]=scanner.nextInt();
        } {
            a2[i]=scanner.nextInt();
        } a2[i]=scanner.nextInt() a2[i] a2 i scanner.nextInt() scanner.nextInt scanner int index=0; index 0 int max=cal(a1,a2,index); max cal(a1,a2,index) cal a1 a2 index index++ index for(int i=1;i<n;i++){
            int next=cal(a1,a2,index);
            if(max<next){
                max=next;
            }
            index++;
        } int i=1; int i=1; i 1 i<n i n i++ i++ i {
            int next=cal(a1,a2,index);
            if(max<next){
                max=next;
            }
            index++;
        } {
            int next=cal(a1,a2,index);
            if(max<next){
                max=next;
            }
            index++;
        } int next=cal(a1,a2,index); next cal(a1,a2,index) cal a1 a2 index if(max<next){
                max=next;
            } max<next max next {
                max=next;
            } max=next max next index++ index System.out.println(max) System.out.println System.out System System.out max String[] args args public static int cal(int[] a1,int[] a2,int index){
        int result=0;
        for(int i=0;i<=index;i++){
            result+=a1[i];
        }
        for(int i=index;i<a1.length;i++){
            result+=a2[i];
        }
        return result;
    } cal {
        int result=0;
        for(int i=0;i<=index;i++){
            result+=a1[i];
        }
        for(int i=index;i<a1.length;i++){
            result+=a2[i];
        }
        return result;
    } int result=0; result 0 for(int i=0;i<=index;i++){
            result+=a1[i];
        } int i=0; int i=0; i 0 i<=index i index i++ i++ i {
            result+=a1[i];
        } {
            result+=a1[i];
        } result+=a1[i] result a1[i] a1 i for(int i=index;i<a1.length;i++){
            result+=a2[i];
        } int i=index; int i=index; i index i<a1.length i a1.length a1 a1.length i++ i++ i {
            result+=a2[i];
        } {
            result+=a2[i];
        } result+=a2[i] result a2[i] a2 i return result; result int[] a1 a1 int[] a2 a2 int index index public class Main {
    public static void main(String[] args) {
	// write your code here
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        int[] a1=new int[n];
        int[] a2=new int[n];
        for(int i=0;i<n;i++){
            a1[i]=scanner.nextInt();
        }
        for(int i=0;i<n;i++){
            a2[i]=scanner.nextInt();
        }
        int index=0;
        int max=cal(a1,a2,index);
        index++;
        for(int i=1;i<n;i++){
            int next=cal(a1,a2,index);
            if(max<next){
                max=next;
            }
            index++;
        }
        System.out.println(max);


    }
    public static int cal(int[] a1,int[] a2,int index){
        int result=0;
        for(int i=0;i<=index;i++){
            result+=a1[i];
        }
        for(int i=index;i<a1.length;i++){
            result+=a2[i];
        }
        return result;
    }
} public class Main {
    public static void main(String[] args) {
	// write your code here
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        int[] a1=new int[n];
        int[] a2=new int[n];
        for(int i=0;i<n;i++){
            a1[i]=scanner.nextInt();
        }
        for(int i=0;i<n;i++){
            a2[i]=scanner.nextInt();
        }
        int index=0;
        int max=cal(a1,a2,index);
        index++;
        for(int i=1;i<n;i++){
            int next=cal(a1,a2,index);
            if(max<next){
                max=next;
            }
            index++;
        }
        System.out.println(max);


    }
    public static int cal(int[] a1,int[] a2,int index){
        int result=0;
        for(int i=0;i<=index;i++){
            result+=a1[i];
        }
        for(int i=index;i<a1.length;i++){
            result+=a2[i];
        }
        return result;
    }
} Main

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
	// write your code here
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        int[] a1=new int[n];
        int[] a2=new int[n];
        for(int i=0;i<n;i++){
            a1[i]=scanner.nextInt();
        }
        for(int i=0;i<n;i++){
            a2[i]=scanner.nextInt();
        }
        int index=0;
        int max=cal(a1,a2,index);
        index++;
        for(int i=1;i<n;i++){
            int next=cal(a1,a2,index);
            if(max<next){
                max=next;
            }
            index++;
        }
        System.out.println(max);


    }
    public static int cal(int[] a1,int[] a2,int index){
        int result=0;
        for(int i=0;i<=index;i++){
            result+=a1[i];
        }
        for(int i=index;i<a1.length;i++){
            result+=a2[i];
        }
        return result;
    }
}
