import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int n = sc.nextInt();

        int[] a = new int[n];
        int[] b = new int[n];

        int i = 0;
        while(i<n){
            a[i] = sc.nextInt();
            i++;
        }

        i = 0;
        while(i<n){
            b[i] = sc.nextInt();
            i++;
        }

        int max = a[0];
        for(int j = 0; j<n; j++) {
            max += b[j];
        }
        
        int sum;
        for(int j = 1; j<n; j++) {
            sum = 0;
            for(i = 0; i<n; i++) {
                if(i<=j)
                   sum+= a[i];
                if(i>=j)
                    sum += b[i];
            }
            if(sum > max) {
                max = sum;
            }
        }

        System.out.println(max);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int n = sc.nextInt();

        int[] a = new int[n];
        int[] b = new int[n];

        int i = 0;
        while(i<n){
            a[i] = sc.nextInt();
            i++;
        }

        i = 0;
        while(i<n){
            b[i] = sc.nextInt();
            i++;
        }

        int max = a[0];
        for(int j = 0; j<n; j++) {
            max += b[j];
        }
        
        int sum;
        for(int j = 1; j<n; j++) {
            sum = 0;
            for(i = 0; i<n; i++) {
                if(i<=j)
                   sum+= a[i];
                if(i>=j)
                    sum += b[i];
            }
            if(sum > max) {
                max = sum;
            }
        }

        System.out.println(max);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int n = sc.nextInt();

        int[] a = new int[n];
        int[] b = new int[n];

        int i = 0;
        while(i<n){
            a[i] = sc.nextInt();
            i++;
        }

        i = 0;
        while(i<n){
            b[i] = sc.nextInt();
            i++;
        }

        int max = a[0];
        for(int j = 0; j<n; j++) {
            max += b[j];
        }
        
        int sum;
        for(int j = 1; j<n; j++) {
            sum = 0;
            for(i = 0; i<n; i++) {
                if(i<=j)
                   sum+= a[i];
                if(i>=j)
                    sum += b[i];
            }
            if(sum > max) {
                max = sum;
            }
        }

        System.out.println(max);
    } main {
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int n = sc.nextInt();

        int[] a = new int[n];
        int[] b = new int[n];

        int i = 0;
        while(i<n){
            a[i] = sc.nextInt();
            i++;
        }

        i = 0;
        while(i<n){
            b[i] = sc.nextInt();
            i++;
        }

        int max = a[0];
        for(int j = 0; j<n; j++) {
            max += b[j];
        }
        
        int sum;
        for(int j = 1; j<n; j++) {
            sum = 0;
            for(i = 0; i<n; i++) {
                if(i<=j)
                   sum+= a[i];
                if(i>=j)
                    sum += b[i];
            }
            if(sum > max) {
                max = sum;
            }
        }

        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[] a = new int[n]; a new int[n] n int[] b = new int[n]; b new int[n] n int i = 0; i 0 while(i<n){
            a[i] = sc.nextInt();
            i++;
        } i<n i n {
            a[i] = sc.nextInt();
            i++;
        } a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc i++ i i = 0 i 0 while(i<n){
            b[i] = sc.nextInt();
            i++;
        } i<n i n {
            b[i] = sc.nextInt();
            i++;
        } b[i] = sc.nextInt() b[i] b i sc.nextInt() sc.nextInt sc i++ i int max = a[0]; max a[0] a 0 for(int j = 0; j<n; j++) {
            max += b[j];
        } int j = 0; int j = 0; j 0 j<n j n j++ j++ j {
            max += b[j];
        } {
            max += b[j];
        } max += b[j] max b[j] b j int sum; sum for(int j = 1; j<n; j++) {
            sum = 0;
            for(i = 0; i<n; i++) {
                if(i<=j)
                   sum+= a[i];
                if(i>=j)
                    sum += b[i];
            }
            if(sum > max) {
                max = sum;
            }
        } int j = 1; int j = 1; j 1 j<n j n j++ j++ j {
            sum = 0;
            for(i = 0; i<n; i++) {
                if(i<=j)
                   sum+= a[i];
                if(i>=j)
                    sum += b[i];
            }
            if(sum > max) {
                max = sum;
            }
        } {
            sum = 0;
            for(i = 0; i<n; i++) {
                if(i<=j)
                   sum+= a[i];
                if(i>=j)
                    sum += b[i];
            }
            if(sum > max) {
                max = sum;
            }
        } sum = 0 sum 0 for(i = 0; i<n; i++) {
                if(i<=j)
                   sum+= a[i];
                if(i>=j)
                    sum += b[i];
            } i = 0; i = 0 i 0 i<n i n i++ i++ i {
                if(i<=j)
                   sum+= a[i];
                if(i>=j)
                    sum += b[i];
            } {
                if(i<=j)
                   sum+= a[i];
                if(i>=j)
                    sum += b[i];
            } if(i<=j)
                   sum+= a[i]; i<=j i j sum+= a[i] sum a[i] a i if(i>=j)
                    sum += b[i]; i>=j i j sum += b[i] sum b[i] b i if(sum > max) {
                max = sum;
            } sum > max sum max {
                max = sum;
            } max = sum max sum 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[] a = new int[n];
        int[] b = new int[n];

        int i = 0;
        while(i<n){
            a[i] = sc.nextInt();
            i++;
        }

        i = 0;
        while(i<n){
            b[i] = sc.nextInt();
            i++;
        }

        int max = a[0];
        for(int j = 0; j<n; j++) {
            max += b[j];
        }
        
        int sum;
        for(int j = 1; j<n; j++) {
            sum = 0;
            for(i = 0; i<n; i++) {
                if(i<=j)
                   sum+= a[i];
                if(i>=j)
                    sum += b[i];
            }
            if(sum > max) {
                max = sum;
            }
        }

        System.out.println(max);
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int n = sc.nextInt();

        int[] a = new int[n];
        int[] b = new int[n];

        int i = 0;
        while(i<n){
            a[i] = sc.nextInt();
            i++;
        }

        i = 0;
        while(i<n){
            b[i] = sc.nextInt();
            i++;
        }

        int max = a[0];
        for(int j = 0; j<n; j++) {
            max += b[j];
        }
        
        int sum;
        for(int j = 1; j<n; j++) {
            sum = 0;
            for(i = 0; i<n; i++) {
                if(i<=j)
                   sum+= a[i];
                if(i>=j)
                    sum += b[i];
            }
            if(sum > max) {
                max = sum;
            }
        }

        System.out.println(max);
    }
} Main
import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int n = sc.nextInt();

        int[] a = new int[n];
        int[] b = new int[n];

        int i = 0;
        while(i<n){
            a[i] = sc.nextInt();
            i++;
        }

        i = 0;
        while(i<n){
            b[i] = sc.nextInt();
            i++;
        }

        int max = a[0];
        for(int j = 0; j<n; j++) {
            max += b[j];
        }
        
        int sum;
        for(int j = 1; j<n; j++) {
            sum = 0;
            for(i = 0; i<n; i++) {
                if(i<=j)
                   sum+= a[i];
                if(i>=j)
                    sum += b[i];
            }
            if(sum > max) {
                max = sum;
            }
        }

        System.out.println(max);
    }
}
