

import java.io.*;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner();
        int N = in.nextInt();
        int arrayT [] = new int [N];
        int arrayB [] = new int [N];
        int top [] = new int [N];
        int sumT = 0;
        int sumB = 0;
        int best = 0;
        for (int i = 0; i < N; i++ )
        {
            arrayT[i] = in.nextInt();
        }
        for (int i = 0; i < N; i++ )
        {
            arrayB[i] = in.nextInt();
        }
        int bottom [] = new int [N];
        for (int i =0; i<N;i++)
        {
            sumT += arrayT[i];
            top[i] = sumT;
        }

        for (int i =N-1; i>=0;i--)
        {
            sumB += arrayB[i];
            bottom[i] = sumB;
        }
        int sum = 0;
        for (int i = 0; i < N; i ++){
            sum = top[i] + bottom[i];

            best = Math.max(sum,best);



        }
        System.out.println(best);



        }




    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return null;
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
} import java.io.*; io.* java import java.util.StringTokenizer; StringTokenizer java.util public class Main {
    public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner();
        int N = in.nextInt();
        int arrayT [] = new int [N];
        int arrayB [] = new int [N];
        int top [] = new int [N];
        int sumT = 0;
        int sumB = 0;
        int best = 0;
        for (int i = 0; i < N; i++ )
        {
            arrayT[i] = in.nextInt();
        }
        for (int i = 0; i < N; i++ )
        {
            arrayB[i] = in.nextInt();
        }
        int bottom [] = new int [N];
        for (int i =0; i<N;i++)
        {
            sumT += arrayT[i];
            top[i] = sumT;
        }

        for (int i =N-1; i>=0;i--)
        {
            sumB += arrayB[i];
            bottom[i] = sumB;
        }
        int sum = 0;
        for (int i = 0; i < N; i ++){
            sum = top[i] + bottom[i];

            best = Math.max(sum,best);



        }
        System.out.println(best);



        }




    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return null;
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
} Main public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner();
        int N = in.nextInt();
        int arrayT [] = new int [N];
        int arrayB [] = new int [N];
        int top [] = new int [N];
        int sumT = 0;
        int sumB = 0;
        int best = 0;
        for (int i = 0; i < N; i++ )
        {
            arrayT[i] = in.nextInt();
        }
        for (int i = 0; i < N; i++ )
        {
            arrayB[i] = in.nextInt();
        }
        int bottom [] = new int [N];
        for (int i =0; i<N;i++)
        {
            sumT += arrayT[i];
            top[i] = sumT;
        }

        for (int i =N-1; i>=0;i--)
        {
            sumB += arrayB[i];
            bottom[i] = sumB;
        }
        int sum = 0;
        for (int i = 0; i < N; i ++){
            sum = top[i] + bottom[i];

            best = Math.max(sum,best);



        }
        System.out.println(best);



        } main {
        FastScanner in = new FastScanner();
        int N = in.nextInt();
        int arrayT [] = new int [N];
        int arrayB [] = new int [N];
        int top [] = new int [N];
        int sumT = 0;
        int sumB = 0;
        int best = 0;
        for (int i = 0; i < N; i++ )
        {
            arrayT[i] = in.nextInt();
        }
        for (int i = 0; i < N; i++ )
        {
            arrayB[i] = in.nextInt();
        }
        int bottom [] = new int [N];
        for (int i =0; i<N;i++)
        {
            sumT += arrayT[i];
            top[i] = sumT;
        }

        for (int i =N-1; i>=0;i--)
        {
            sumB += arrayB[i];
            bottom[i] = sumB;
        }
        int sum = 0;
        for (int i = 0; i < N; i ++){
            sum = top[i] + bottom[i];

            best = Math.max(sum,best);



        }
        System.out.println(best);



        } FastScanner in = new FastScanner(); in new FastScanner() int N = in.nextInt(); N in.nextInt() in.nextInt in int arrayT [] = new int [N]; arrayT new int [N] N int arrayB [] = new int [N]; arrayB new int [N] N int top [] = new int [N]; top new int [N] N int sumT = 0; sumT 0 int sumB = 0; sumB 0 int best = 0; best 0 for (int i = 0; i < N; i++ )
        {
            arrayT[i] = in.nextInt();
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            arrayT[i] = in.nextInt();
        } {
            arrayT[i] = in.nextInt();
        } arrayT[i] = in.nextInt() arrayT[i] arrayT i in.nextInt() in.nextInt in for (int i = 0; i < N; i++ )
        {
            arrayB[i] = in.nextInt();
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            arrayB[i] = in.nextInt();
        } {
            arrayB[i] = in.nextInt();
        } arrayB[i] = in.nextInt() arrayB[i] arrayB i in.nextInt() in.nextInt in int bottom [] = new int [N]; bottom new int [N] N for (int i =0; i<N;i++)
        {
            sumT += arrayT[i];
            top[i] = sumT;
        } int i =0; int i =0; i 0 i<N i N i++ i++ i {
            sumT += arrayT[i];
            top[i] = sumT;
        } {
            sumT += arrayT[i];
            top[i] = sumT;
        } sumT += arrayT[i] sumT arrayT[i] arrayT i top[i] = sumT top[i] top i sumT for (int i =N-1; i>=0;i--)
        {
            sumB += arrayB[i];
            bottom[i] = sumB;
        } int i =N-1; int i =N-1; i N-1 N 1 i>=0 i 0 i-- i-- i {
            sumB += arrayB[i];
            bottom[i] = sumB;
        } {
            sumB += arrayB[i];
            bottom[i] = sumB;
        } sumB += arrayB[i] sumB arrayB[i] arrayB i bottom[i] = sumB bottom[i] bottom i sumB int sum = 0; sum 0 for (int i = 0; i < N; i ++){
            sum = top[i] + bottom[i];

            best = Math.max(sum,best);



        } int i = 0; int i = 0; i 0 i < N i N i ++ i ++ i {
            sum = top[i] + bottom[i];

            best = Math.max(sum,best);



        } {
            sum = top[i] + bottom[i];

            best = Math.max(sum,best);



        } sum = top[i] + bottom[i] sum top[i] + bottom[i] top[i] top i bottom[i] bottom i best = Math.max(sum,best) best Math.max(sum,best) Math.max Math sum best System.out.println(best) System.out.println System.out System System.out best String[] args args public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return null;
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    } FastScanner BufferedReader br; br StringTokenizer st; st public FastScanner(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        } FastScanner {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        } try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } FileNotFoundException e {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } e.printStackTrace() e.printStackTrace e {
                br = new BufferedReader(new FileReader(s));
            } br = new BufferedReader(new FileReader(s)) br new BufferedReader(new FileReader(s)) String s s public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        } FastScanner {
            br = new BufferedReader(new InputStreamReader(System.in));
        } br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } nextToken {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            } st == null || !st.hasMoreElements() st == null st null !st.hasMoreElements() st.hasMoreElements() st.hasMoreElements st {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            } try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                } IOException e {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                } e.printStackTrace() e.printStackTrace e {
                    st = new StringTokenizer(br.readLine());
                } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return null;
        } nextLine {
            st = null;
            try {
                return br.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return null;
        } st = null st null try {
                return br.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } IOException e {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } e.printStackTrace() e.printStackTrace e {
                return br.readLine();
            } return br.readLine(); br.readLine() br.readLine br return null; null int nextInt() {
            return Integer.parseInt(nextToken());
        } nextInt {
            return Integer.parseInt(nextToken());
        } return Integer.parseInt(nextToken()); Integer.parseInt(nextToken()) Integer.parseInt Integer nextToken() nextToken long nextLong() {
            return Long.parseLong(nextToken());
        } nextLong {
            return Long.parseLong(nextToken());
        } return Long.parseLong(nextToken()); Long.parseLong(nextToken()) Long.parseLong Long nextToken() nextToken double nextDouble() {
            return Double.parseDouble(nextToken());
        } nextDouble {
            return Double.parseDouble(nextToken());
        } return Double.parseDouble(nextToken()); Double.parseDouble(nextToken()) Double.parseDouble Double nextToken() nextToken public class Main {
    public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner();
        int N = in.nextInt();
        int arrayT [] = new int [N];
        int arrayB [] = new int [N];
        int top [] = new int [N];
        int sumT = 0;
        int sumB = 0;
        int best = 0;
        for (int i = 0; i < N; i++ )
        {
            arrayT[i] = in.nextInt();
        }
        for (int i = 0; i < N; i++ )
        {
            arrayB[i] = in.nextInt();
        }
        int bottom [] = new int [N];
        for (int i =0; i<N;i++)
        {
            sumT += arrayT[i];
            top[i] = sumT;
        }

        for (int i =N-1; i>=0;i--)
        {
            sumB += arrayB[i];
            bottom[i] = sumB;
        }
        int sum = 0;
        for (int i = 0; i < N; i ++){
            sum = top[i] + bottom[i];

            best = Math.max(sum,best);



        }
        System.out.println(best);



        }




    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return null;
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner();
        int N = in.nextInt();
        int arrayT [] = new int [N];
        int arrayB [] = new int [N];
        int top [] = new int [N];
        int sumT = 0;
        int sumB = 0;
        int best = 0;
        for (int i = 0; i < N; i++ )
        {
            arrayT[i] = in.nextInt();
        }
        for (int i = 0; i < N; i++ )
        {
            arrayB[i] = in.nextInt();
        }
        int bottom [] = new int [N];
        for (int i =0; i<N;i++)
        {
            sumT += arrayT[i];
            top[i] = sumT;
        }

        for (int i =N-1; i>=0;i--)
        {
            sumB += arrayB[i];
            bottom[i] = sumB;
        }
        int sum = 0;
        for (int i = 0; i < N; i ++){
            sum = top[i] + bottom[i];

            best = Math.max(sum,best);



        }
        System.out.println(best);



        }




    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return null;
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
} Main


import java.io.*;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner();
        int N = in.nextInt();
        int arrayT [] = new int [N];
        int arrayB [] = new int [N];
        int top [] = new int [N];
        int sumT = 0;
        int sumB = 0;
        int best = 0;
        for (int i = 0; i < N; i++ )
        {
            arrayT[i] = in.nextInt();
        }
        for (int i = 0; i < N; i++ )
        {
            arrayB[i] = in.nextInt();
        }
        int bottom [] = new int [N];
        for (int i =0; i<N;i++)
        {
            sumT += arrayT[i];
            top[i] = sumT;
        }

        for (int i =N-1; i>=0;i--)
        {
            sumB += arrayB[i];
            bottom[i] = sumB;
        }
        int sum = 0;
        for (int i = 0; i < N; i ++){
            sum = top[i] + bottom[i];

            best = Math.max(sum,best);



        }
        System.out.println(best);



        }




    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return null;
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
}
