import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.nextLine());
        ArrayList<Integer> fir = new ArrayList<Integer>();
        ArrayList<Integer> sec = new ArrayList<Integer>();
        String[] input1 = sc.nextLine().split(" ");
        String[] input2 = sc.nextLine().split(" ");
        int ans = 0;
        for(int i=0 ; i<n ; i++){
            fir.add(Integer.parseInt(input1[i]));
            sec.add(Integer.parseInt(input2[i]));
        }
        fir.add(0);
        sec.add(0);
        //System.out.println(fir + " " + sec);
        for(int i = 0 ; i < n ; i++){
            int count = get(n ,i ,fir , sec );
            if(ans <= count){
                ans = count;
            }
        }
        System.out.println(ans);
    }

    static int get(int n,int sign , ArrayList<Integer> a , ArrayList<Integer> b){
        int sum = 0;
        for(int i = 0;i <= sign; i++){
            sum += a.get(i);
        }
        for(int i = sign; i < n; i++){
            sum += b.get(i);
        }
        return sum;
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.nextLine());
        ArrayList<Integer> fir = new ArrayList<Integer>();
        ArrayList<Integer> sec = new ArrayList<Integer>();
        String[] input1 = sc.nextLine().split(" ");
        String[] input2 = sc.nextLine().split(" ");
        int ans = 0;
        for(int i=0 ; i<n ; i++){
            fir.add(Integer.parseInt(input1[i]));
            sec.add(Integer.parseInt(input2[i]));
        }
        fir.add(0);
        sec.add(0);
        //System.out.println(fir + " " + sec);
        for(int i = 0 ; i < n ; i++){
            int count = get(n ,i ,fir , sec );
            if(ans <= count){
                ans = count;
            }
        }
        System.out.println(ans);
    }

    static int get(int n,int sign , ArrayList<Integer> a , ArrayList<Integer> b){
        int sum = 0;
        for(int i = 0;i <= sign; i++){
            sum += a.get(i);
        }
        for(int i = sign; i < n; i++){
            sum += b.get(i);
        }
        return sum;
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.nextLine());
        ArrayList<Integer> fir = new ArrayList<Integer>();
        ArrayList<Integer> sec = new ArrayList<Integer>();
        String[] input1 = sc.nextLine().split(" ");
        String[] input2 = sc.nextLine().split(" ");
        int ans = 0;
        for(int i=0 ; i<n ; i++){
            fir.add(Integer.parseInt(input1[i]));
            sec.add(Integer.parseInt(input2[i]));
        }
        fir.add(0);
        sec.add(0);
        //System.out.println(fir + " " + sec);
        for(int i = 0 ; i < n ; i++){
            int count = get(n ,i ,fir , sec );
            if(ans <= count){
                ans = count;
            }
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.nextLine());
        ArrayList<Integer> fir = new ArrayList<Integer>();
        ArrayList<Integer> sec = new ArrayList<Integer>();
        String[] input1 = sc.nextLine().split(" ");
        String[] input2 = sc.nextLine().split(" ");
        int ans = 0;
        for(int i=0 ; i<n ; i++){
            fir.add(Integer.parseInt(input1[i]));
            sec.add(Integer.parseInt(input2[i]));
        }
        fir.add(0);
        sec.add(0);
        //System.out.println(fir + " " + sec);
        for(int i = 0 ; i < n ; i++){
            int count = get(n ,i ,fir , sec );
            if(ans <= count){
                ans = count;
            }
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.nextLine()); n Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc ArrayList<Integer> fir = new ArrayList<Integer>(); fir new ArrayList<Integer>() ArrayList<Integer> sec = new ArrayList<Integer>(); sec new ArrayList<Integer>() String[] input1 = sc.nextLine().split(" "); input1 sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " String[] input2 = sc.nextLine().split(" "); input2 sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int ans = 0; ans 0 for(int i=0 ; i<n ; i++){
            fir.add(Integer.parseInt(input1[i]));
            sec.add(Integer.parseInt(input2[i]));
        } int i=0 ; int i=0 ; i 0 i<n i n i++ i++ i {
            fir.add(Integer.parseInt(input1[i]));
            sec.add(Integer.parseInt(input2[i]));
        } {
            fir.add(Integer.parseInt(input1[i]));
            sec.add(Integer.parseInt(input2[i]));
        } fir.add(Integer.parseInt(input1[i])) fir.add fir Integer.parseInt(input1[i]) Integer.parseInt Integer input1[i] input1 i sec.add(Integer.parseInt(input2[i])) sec.add sec Integer.parseInt(input2[i]) Integer.parseInt Integer input2[i] input2 i fir.add(0) fir.add fir 0 sec.add(0) sec.add sec 0 for(int i = 0 ; i < n ; i++){
            int count = get(n ,i ,fir , sec );
            if(ans <= count){
                ans = count;
            }
        } int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
            int count = get(n ,i ,fir , sec );
            if(ans <= count){
                ans = count;
            }
        } {
            int count = get(n ,i ,fir , sec );
            if(ans <= count){
                ans = count;
            }
        } int count = get(n ,i ,fir , sec ); count get(n ,i ,fir , sec ) get n i fir sec if(ans <= count){
                ans = count;
            } ans <= count ans count {
                ans = count;
            } ans = count ans count System.out.println(ans) System.out.println System.out System System.out ans String[] args args static int get(int n,int sign , ArrayList<Integer> a , ArrayList<Integer> b){
        int sum = 0;
        for(int i = 0;i <= sign; i++){
            sum += a.get(i);
        }
        for(int i = sign; i < n; i++){
            sum += b.get(i);
        }
        return sum;
    } get {
        int sum = 0;
        for(int i = 0;i <= sign; i++){
            sum += a.get(i);
        }
        for(int i = sign; i < n; i++){
            sum += b.get(i);
        }
        return sum;
    } int sum = 0; sum 0 for(int i = 0;i <= sign; i++){
            sum += a.get(i);
        } int i = 0; int i = 0; i 0 i <= sign i sign i++ i++ i {
            sum += a.get(i);
        } {
            sum += a.get(i);
        } sum += a.get(i) sum a.get(i) a.get a i for(int i = sign; i < n; i++){
            sum += b.get(i);
        } int i = sign; int i = sign; i sign i < n i n i++ i++ i {
            sum += b.get(i);
        } {
            sum += b.get(i);
        } sum += b.get(i) sum b.get(i) b.get b i return sum; sum int n n int sign sign ArrayList<Integer> a a ArrayList<Integer> b b public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.nextLine());
        ArrayList<Integer> fir = new ArrayList<Integer>();
        ArrayList<Integer> sec = new ArrayList<Integer>();
        String[] input1 = sc.nextLine().split(" ");
        String[] input2 = sc.nextLine().split(" ");
        int ans = 0;
        for(int i=0 ; i<n ; i++){
            fir.add(Integer.parseInt(input1[i]));
            sec.add(Integer.parseInt(input2[i]));
        }
        fir.add(0);
        sec.add(0);
        //System.out.println(fir + " " + sec);
        for(int i = 0 ; i < n ; i++){
            int count = get(n ,i ,fir , sec );
            if(ans <= count){
                ans = count;
            }
        }
        System.out.println(ans);
    }

    static int get(int n,int sign , ArrayList<Integer> a , ArrayList<Integer> b){
        int sum = 0;
        for(int i = 0;i <= sign; i++){
            sum += a.get(i);
        }
        for(int i = sign; i < n; i++){
            sum += b.get(i);
        }
        return sum;
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.nextLine());
        ArrayList<Integer> fir = new ArrayList<Integer>();
        ArrayList<Integer> sec = new ArrayList<Integer>();
        String[] input1 = sc.nextLine().split(" ");
        String[] input2 = sc.nextLine().split(" ");
        int ans = 0;
        for(int i=0 ; i<n ; i++){
            fir.add(Integer.parseInt(input1[i]));
            sec.add(Integer.parseInt(input2[i]));
        }
        fir.add(0);
        sec.add(0);
        //System.out.println(fir + " " + sec);
        for(int i = 0 ; i < n ; i++){
            int count = get(n ,i ,fir , sec );
            if(ans <= count){
                ans = count;
            }
        }
        System.out.println(ans);
    }

    static int get(int n,int sign , ArrayList<Integer> a , ArrayList<Integer> b){
        int sum = 0;
        for(int i = 0;i <= sign; i++){
            sum += a.get(i);
        }
        for(int i = sign; i < n; i++){
            sum += b.get(i);
        }
        return sum;
    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.nextLine());
        ArrayList<Integer> fir = new ArrayList<Integer>();
        ArrayList<Integer> sec = new ArrayList<Integer>();
        String[] input1 = sc.nextLine().split(" ");
        String[] input2 = sc.nextLine().split(" ");
        int ans = 0;
        for(int i=0 ; i<n ; i++){
            fir.add(Integer.parseInt(input1[i]));
            sec.add(Integer.parseInt(input2[i]));
        }
        fir.add(0);
        sec.add(0);
        //System.out.println(fir + " " + sec);
        for(int i = 0 ; i < n ; i++){
            int count = get(n ,i ,fir , sec );
            if(ans <= count){
                ans = count;
            }
        }
        System.out.println(ans);
    }

    static int get(int n,int sign , ArrayList<Integer> a , ArrayList<Integer> b){
        int sum = 0;
        for(int i = 0;i <= sign; i++){
            sum += a.get(i);
        }
        for(int i = sign; i < n; i++){
            sum += b.get(i);
        }
        return sum;
    }
}
