import java.util.*;
import java.lang.*;
import java.io.*;

public class Main {
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    public static void main(String args[]) throws IOException {
        FastReader s = new FastReader();
        int n = s.nextInt();
        int a[][] = new int[2][n];
        for(int i=0;i<2;i++){
            for(int j=0;j<n;j++){
                a[i][j] = s.nextInt();
            }
        }
        int ans = 0;
        int t[] = new int[n];
        int b[] = new int[n];
        t[0] = a[0][0];
        for(int i=1;i<n;i++){
            t[i] = t[i-1] + a[0][i];
        }
        b[n-1] = a[1][n-1];
        for(int j = n-2;j>=0;j--){
            b[j] = b[j+1] + a[1][j];
        }
        for(int i=0;i<n;i++){
            ans = Math.max(ans,t[i]+b[i]);
        }
        System.out.println(ans);
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

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

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java public class Main {
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    public static void main(String args[]) throws IOException {
        FastReader s = new FastReader();
        int n = s.nextInt();
        int a[][] = new int[2][n];
        for(int i=0;i<2;i++){
            for(int j=0;j<n;j++){
                a[i][j] = s.nextInt();
            }
        }
        int ans = 0;
        int t[] = new int[n];
        int b[] = new int[n];
        t[0] = a[0][0];
        for(int i=1;i<n;i++){
            t[i] = t[i-1] + a[0][i];
        }
        b[n-1] = a[1][n-1];
        for(int j = n-2;j>=0;j--){
            b[j] = b[j+1] + a[1][j];
        }
        for(int i=0;i<n;i++){
            ans = Math.max(ans,t[i]+b[i]);
        }
        System.out.println(ans);
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

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

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
} Main static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) public static void main(String args[]) throws IOException {
        FastReader s = new FastReader();
        int n = s.nextInt();
        int a[][] = new int[2][n];
        for(int i=0;i<2;i++){
            for(int j=0;j<n;j++){
                a[i][j] = s.nextInt();
            }
        }
        int ans = 0;
        int t[] = new int[n];
        int b[] = new int[n];
        t[0] = a[0][0];
        for(int i=1;i<n;i++){
            t[i] = t[i-1] + a[0][i];
        }
        b[n-1] = a[1][n-1];
        for(int j = n-2;j>=0;j--){
            b[j] = b[j+1] + a[1][j];
        }
        for(int i=0;i<n;i++){
            ans = Math.max(ans,t[i]+b[i]);
        }
        System.out.println(ans);
    } main {
        FastReader s = new FastReader();
        int n = s.nextInt();
        int a[][] = new int[2][n];
        for(int i=0;i<2;i++){
            for(int j=0;j<n;j++){
                a[i][j] = s.nextInt();
            }
        }
        int ans = 0;
        int t[] = new int[n];
        int b[] = new int[n];
        t[0] = a[0][0];
        for(int i=1;i<n;i++){
            t[i] = t[i-1] + a[0][i];
        }
        b[n-1] = a[1][n-1];
        for(int j = n-2;j>=0;j--){
            b[j] = b[j+1] + a[1][j];
        }
        for(int i=0;i<n;i++){
            ans = Math.max(ans,t[i]+b[i]);
        }
        System.out.println(ans);
    } FastReader s = new FastReader(); s new FastReader() int n = s.nextInt(); n s.nextInt() s.nextInt s int a[][] = new int[2][n]; a new int[2][n] 2 n for(int i=0;i<2;i++){
            for(int j=0;j<n;j++){
                a[i][j] = s.nextInt();
            }
        } int i=0; int i=0; i 0 i<2 i 2 i++ i++ i {
            for(int j=0;j<n;j++){
                a[i][j] = s.nextInt();
            }
        } {
            for(int j=0;j<n;j++){
                a[i][j] = s.nextInt();
            }
        } for(int j=0;j<n;j++){
                a[i][j] = s.nextInt();
            } int j=0; int j=0; j 0 j<n j n j++ j++ j {
                a[i][j] = s.nextInt();
            } {
                a[i][j] = s.nextInt();
            } a[i][j] = s.nextInt() a[i][j] a[i] a i j s.nextInt() s.nextInt s int ans = 0; ans 0 int t[] = new int[n]; t new int[n] n int b[] = new int[n]; b new int[n] n t[0] = a[0][0] t[0] t 0 a[0][0] a[0] a 0 0 for(int i=1;i<n;i++){
            t[i] = t[i-1] + a[0][i];
        } int i=1; int i=1; i 1 i<n i n i++ i++ i {
            t[i] = t[i-1] + a[0][i];
        } {
            t[i] = t[i-1] + a[0][i];
        } t[i] = t[i-1] + a[0][i] t[i] t i t[i-1] + a[0][i] t[i-1] t i-1 i 1 a[0][i] a[0] a 0 i b[n-1] = a[1][n-1] b[n-1] b n-1 n 1 a[1][n-1] a[1] a 1 n-1 n 1 for(int j = n-2;j>=0;j--){
            b[j] = b[j+1] + a[1][j];
        } int j = n-2; int j = n-2; j n-2 n 2 j>=0 j 0 j-- j-- j {
            b[j] = b[j+1] + a[1][j];
        } {
            b[j] = b[j+1] + a[1][j];
        } b[j] = b[j+1] + a[1][j] b[j] b j b[j+1] + a[1][j] b[j+1] b j+1 j 1 a[1][j] a[1] a 1 j for(int i=0;i<n;i++){
            ans = Math.max(ans,t[i]+b[i]);
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            ans = Math.max(ans,t[i]+b[i]);
        } {
            ans = Math.max(ans,t[i]+b[i]);
        } ans = Math.max(ans,t[i]+b[i]) ans Math.max(ans,t[i]+b[i]) Math.max Math ans t[i]+b[i] t[i] t i b[i] b i System.out.println(ans) System.out.println System.out System System.out ans String args[] args static class FastReader {
        BufferedReader br;
        StringTokenizer st;

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

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    } FastReader BufferedReader br; br StringTokenizer st; st public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        } FastReader {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        } br = new BufferedReader(new
                    InputStreamReader(System.in)) br new BufferedReader(new
                    InputStreamReader(System.in)) String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } next {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    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) {
                    e.printStackTrace();
                }
            } try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                } catch (IOException e) {
                    e.printStackTrace();
                } IOException e {
                    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 int nextInt() {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next long nextLong() {
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next double nextDouble() {
            return Double.parseDouble(next());
        } nextDouble {
            return Double.parseDouble(next());
        } return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        } nextLine {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        } String str = ""; str "" try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } IOException e {
                e.printStackTrace();
            } e.printStackTrace() e.printStackTrace e {
                str = br.readLine();
            } str = br.readLine() str br.readLine() br.readLine br return str; str public class Main {
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    public static void main(String args[]) throws IOException {
        FastReader s = new FastReader();
        int n = s.nextInt();
        int a[][] = new int[2][n];
        for(int i=0;i<2;i++){
            for(int j=0;j<n;j++){
                a[i][j] = s.nextInt();
            }
        }
        int ans = 0;
        int t[] = new int[n];
        int b[] = new int[n];
        t[0] = a[0][0];
        for(int i=1;i<n;i++){
            t[i] = t[i-1] + a[0][i];
        }
        b[n-1] = a[1][n-1];
        for(int j = n-2;j>=0;j--){
            b[j] = b[j+1] + a[1][j];
        }
        for(int i=0;i<n;i++){
            ans = Math.max(ans,t[i]+b[i]);
        }
        System.out.println(ans);
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

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

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
} public class Main {
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    public static void main(String args[]) throws IOException {
        FastReader s = new FastReader();
        int n = s.nextInt();
        int a[][] = new int[2][n];
        for(int i=0;i<2;i++){
            for(int j=0;j<n;j++){
                a[i][j] = s.nextInt();
            }
        }
        int ans = 0;
        int t[] = new int[n];
        int b[] = new int[n];
        t[0] = a[0][0];
        for(int i=1;i<n;i++){
            t[i] = t[i-1] + a[0][i];
        }
        b[n-1] = a[1][n-1];
        for(int j = n-2;j>=0;j--){
            b[j] = b[j+1] + a[1][j];
        }
        for(int i=0;i<n;i++){
            ans = Math.max(ans,t[i]+b[i]);
        }
        System.out.println(ans);
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

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

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
} Main
import java.util.*;
import java.lang.*;
import java.io.*;

public class Main {
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    public static void main(String args[]) throws IOException {
        FastReader s = new FastReader();
        int n = s.nextInt();
        int a[][] = new int[2][n];
        for(int i=0;i<2;i++){
            for(int j=0;j<n;j++){
                a[i][j] = s.nextInt();
            }
        }
        int ans = 0;
        int t[] = new int[n];
        int b[] = new int[n];
        t[0] = a[0][0];
        for(int i=1;i<n;i++){
            t[i] = t[i-1] + a[0][i];
        }
        b[n-1] = a[1][n-1];
        for(int j = n-2;j>=0;j--){
            b[j] = b[j+1] + a[1][j];
        }
        for(int i=0;i<n;i++){
            ans = Math.max(ans,t[i]+b[i]);
        }
        System.out.println(ans);
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

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

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}
