import java.util.*;
import static java.lang.Math.abs;
import static java.lang.Math.max;

public class Main {

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();

        int[] h = new int[N];
        for(int i = 0; i < N; i++){

            h[i] = scan.nextInt();
        }

        int[] l = new int[N];
        for(int i = 0; i < N; i++){

            l[i] = scan.nextInt();
        }


        int tmp = 0;
        int ans = 0;
        for(int i = 0; i < N; i++ ){

            tmp = 0;

            for(int j = 0; j <= i; j++){

                tmp += h[j];
            }

            for(int j = i; j < N; j++){

                tmp += l[j];
            }

            ans = max(ans, tmp);
        }

        System.out.print(ans);
        
    }
} import java.util.*; util.* java import static java.lang.Math.abs; import static java.lang.Math.abs; import static java.lang.Math.abs; import static java.lang.Math.max; import static java.lang.Math.max; import static java.lang.Math.max; public class Main {

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();

        int[] h = new int[N];
        for(int i = 0; i < N; i++){

            h[i] = scan.nextInt();
        }

        int[] l = new int[N];
        for(int i = 0; i < N; i++){

            l[i] = scan.nextInt();
        }


        int tmp = 0;
        int ans = 0;
        for(int i = 0; i < N; i++ ){

            tmp = 0;

            for(int j = 0; j <= i; j++){

                tmp += h[j];
            }

            for(int j = i; j < N; j++){

                tmp += l[j];
            }

            ans = max(ans, tmp);
        }

        System.out.print(ans);
        
    }
} Main public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();

        int[] h = new int[N];
        for(int i = 0; i < N; i++){

            h[i] = scan.nextInt();
        }

        int[] l = new int[N];
        for(int i = 0; i < N; i++){

            l[i] = scan.nextInt();
        }


        int tmp = 0;
        int ans = 0;
        for(int i = 0; i < N; i++ ){

            tmp = 0;

            for(int j = 0; j <= i; j++){

                tmp += h[j];
            }

            for(int j = i; j < N; j++){

                tmp += l[j];
            }

            ans = max(ans, tmp);
        }

        System.out.print(ans);
        
    } main {

        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();

        int[] h = new int[N];
        for(int i = 0; i < N; i++){

            h[i] = scan.nextInt();
        }

        int[] l = new int[N];
        for(int i = 0; i < N; i++){

            l[i] = scan.nextInt();
        }


        int tmp = 0;
        int ans = 0;
        for(int i = 0; i < N; i++ ){

            tmp = 0;

            for(int j = 0; j <= i; j++){

                tmp += h[j];
            }

            for(int j = i; j < N; j++){

                tmp += l[j];
            }

            ans = max(ans, tmp);
        }

        System.out.print(ans);
        
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int[] h = new int[N]; h new int[N] N for(int i = 0; i < N; i++){

            h[i] = scan.nextInt();
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {

            h[i] = scan.nextInt();
        } {

            h[i] = scan.nextInt();
        } h[i] = scan.nextInt() h[i] h i scan.nextInt() scan.nextInt scan int[] l = new int[N]; l new int[N] N for(int i = 0; i < N; i++){

            l[i] = scan.nextInt();
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {

            l[i] = scan.nextInt();
        } {

            l[i] = scan.nextInt();
        } l[i] = scan.nextInt() l[i] l i scan.nextInt() scan.nextInt scan int tmp = 0; tmp 0 int ans = 0; ans 0 for(int i = 0; i < N; i++ ){

            tmp = 0;

            for(int j = 0; j <= i; j++){

                tmp += h[j];
            }

            for(int j = i; j < N; j++){

                tmp += l[j];
            }

            ans = max(ans, tmp);
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {

            tmp = 0;

            for(int j = 0; j <= i; j++){

                tmp += h[j];
            }

            for(int j = i; j < N; j++){

                tmp += l[j];
            }

            ans = max(ans, tmp);
        } {

            tmp = 0;

            for(int j = 0; j <= i; j++){

                tmp += h[j];
            }

            for(int j = i; j < N; j++){

                tmp += l[j];
            }

            ans = max(ans, tmp);
        } tmp = 0 tmp 0 for(int j = 0; j <= i; j++){

                tmp += h[j];
            } int j = 0; int j = 0; j 0 j <= i j i j++ j++ j {

                tmp += h[j];
            } {

                tmp += h[j];
            } tmp += h[j] tmp h[j] h j for(int j = i; j < N; j++){

                tmp += l[j];
            } int j = i; int j = i; j i j < N j N j++ j++ j {

                tmp += l[j];
            } {

                tmp += l[j];
            } tmp += l[j] tmp l[j] l j ans = max(ans, tmp) ans max(ans, tmp) max ans tmp System.out.print(ans) System.out.print System.out System System.out ans String[] args args public class Main {

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();

        int[] h = new int[N];
        for(int i = 0; i < N; i++){

            h[i] = scan.nextInt();
        }

        int[] l = new int[N];
        for(int i = 0; i < N; i++){

            l[i] = scan.nextInt();
        }


        int tmp = 0;
        int ans = 0;
        for(int i = 0; i < N; i++ ){

            tmp = 0;

            for(int j = 0; j <= i; j++){

                tmp += h[j];
            }

            for(int j = i; j < N; j++){

                tmp += l[j];
            }

            ans = max(ans, tmp);
        }

        System.out.print(ans);
        
    }
} public class Main {

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();

        int[] h = new int[N];
        for(int i = 0; i < N; i++){

            h[i] = scan.nextInt();
        }

        int[] l = new int[N];
        for(int i = 0; i < N; i++){

            l[i] = scan.nextInt();
        }


        int tmp = 0;
        int ans = 0;
        for(int i = 0; i < N; i++ ){

            tmp = 0;

            for(int j = 0; j <= i; j++){

                tmp += h[j];
            }

            for(int j = i; j < N; j++){

                tmp += l[j];
            }

            ans = max(ans, tmp);
        }

        System.out.print(ans);
        
    }
} Main
import java.util.*;
import static java.lang.Math.abs;
import static java.lang.Math.max;

public class Main {

    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();

        int[] h = new int[N];
        for(int i = 0; i < N; i++){

            h[i] = scan.nextInt();
        }

        int[] l = new int[N];
        for(int i = 0; i < N; i++){

            l[i] = scan.nextInt();
        }


        int tmp = 0;
        int ans = 0;
        for(int i = 0; i < N; i++ ){

            tmp = 0;

            for(int j = 0; j <= i; j++){

                tmp += h[j];
            }

            for(int j = i; j < N; j++){

                tmp += l[j];
            }

            ans = max(ans, tmp);
        }

        System.out.print(ans);
        
    }
}