import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        C solver = new C();
        solver.solve(1, in, out);
        out.close();
    }

    static class C {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int n = Integer.parseInt(in.next());
            int a[][] = new int[2][n];
            for (int i = 0; i < n; i++) {
                a[0][i] = Integer.parseInt(in.next());
            }
            for (int i = 0; i < n; i++) {
                a[1][i] = Integer.parseInt(in.next());
            }
            int ans = 0;
            int sum = 0;
            int ptrx = n - 1;
            int ptry = -1;

            for (int i = 0; i < 2; ) {
                sum = 0;
                for (int j = i; j <= ptrx; j++) {
                    sum += a[0][j];
                }
                if (ptrx >= 0) {
                    for (int j = ptrx; j < n; j++) {
                        sum += a[1][j];
                    }
                }
                ans = Math.max(ans, sum);
                ptrx--;
                if (ptrx < 0) {
                    i++;
                    ptrx = n - 1;
                }
            }

            // 出力
            out.println(ans);

        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        C solver = new C();
        solver.solve(1, in, out);
        out.close();
    }

    static class C {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int n = Integer.parseInt(in.next());
            int a[][] = new int[2][n];
            for (int i = 0; i < n; i++) {
                a[0][i] = Integer.parseInt(in.next());
            }
            for (int i = 0; i < n; i++) {
                a[1][i] = Integer.parseInt(in.next());
            }
            int ans = 0;
            int sum = 0;
            int ptrx = n - 1;
            int ptry = -1;

            for (int i = 0; i < 2; ) {
                sum = 0;
                for (int j = i; j <= ptrx; j++) {
                    sum += a[0][j];
                }
                if (ptrx >= 0) {
                    for (int j = ptrx; j < n; j++) {
                        sum += a[1][j];
                    }
                }
                ans = Math.max(ans, sum);
                ptrx--;
                if (ptrx < 0) {
                    i++;
                    ptrx = n - 1;
                }
            }

            // 出力
            out.println(ans);

        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        C solver = new C();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        C solver = new C();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) C solver = new C(); solver new C() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class C {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int n = Integer.parseInt(in.next());
            int a[][] = new int[2][n];
            for (int i = 0; i < n; i++) {
                a[0][i] = Integer.parseInt(in.next());
            }
            for (int i = 0; i < n; i++) {
                a[1][i] = Integer.parseInt(in.next());
            }
            int ans = 0;
            int sum = 0;
            int ptrx = n - 1;
            int ptry = -1;

            for (int i = 0; i < 2; ) {
                sum = 0;
                for (int j = i; j <= ptrx; j++) {
                    sum += a[0][j];
                }
                if (ptrx >= 0) {
                    for (int j = ptrx; j < n; j++) {
                        sum += a[1][j];
                    }
                }
                ans = Math.max(ans, sum);
                ptrx--;
                if (ptrx < 0) {
                    i++;
                    ptrx = n - 1;
                }
            }

            // 出力
            out.println(ans);

        }

    } C public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int n = Integer.parseInt(in.next());
            int a[][] = new int[2][n];
            for (int i = 0; i < n; i++) {
                a[0][i] = Integer.parseInt(in.next());
            }
            for (int i = 0; i < n; i++) {
                a[1][i] = Integer.parseInt(in.next());
            }
            int ans = 0;
            int sum = 0;
            int ptrx = n - 1;
            int ptry = -1;

            for (int i = 0; i < 2; ) {
                sum = 0;
                for (int j = i; j <= ptrx; j++) {
                    sum += a[0][j];
                }
                if (ptrx >= 0) {
                    for (int j = ptrx; j < n; j++) {
                        sum += a[1][j];
                    }
                }
                ans = Math.max(ans, sum);
                ptrx--;
                if (ptrx < 0) {
                    i++;
                    ptrx = n - 1;
                }
            }

            // 出力
            out.println(ans);

        } solve {
            // 入力
            int n = Integer.parseInt(in.next());
            int a[][] = new int[2][n];
            for (int i = 0; i < n; i++) {
                a[0][i] = Integer.parseInt(in.next());
            }
            for (int i = 0; i < n; i++) {
                a[1][i] = Integer.parseInt(in.next());
            }
            int ans = 0;
            int sum = 0;
            int ptrx = n - 1;
            int ptry = -1;

            for (int i = 0; i < 2; ) {
                sum = 0;
                for (int j = i; j <= ptrx; j++) {
                    sum += a[0][j];
                }
                if (ptrx >= 0) {
                    for (int j = ptrx; j < n; j++) {
                        sum += a[1][j];
                    }
                }
                ans = Math.max(ans, sum);
                ptrx--;
                if (ptrx < 0) {
                    i++;
                    ptrx = n - 1;
                }
            }

            // 出力
            out.println(ans);

        } int n = Integer.parseInt(in.next()); n Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in int a[][] = new int[2][n]; a new int[2][n] 2 n for (int i = 0; i < n; i++) {
                a[0][i] = Integer.parseInt(in.next());
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                a[0][i] = Integer.parseInt(in.next());
            } {
                a[0][i] = Integer.parseInt(in.next());
            } a[0][i] = Integer.parseInt(in.next()) a[0][i] a[0] a 0 i Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in for (int i = 0; i < n; i++) {
                a[1][i] = Integer.parseInt(in.next());
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                a[1][i] = Integer.parseInt(in.next());
            } {
                a[1][i] = Integer.parseInt(in.next());
            } a[1][i] = Integer.parseInt(in.next()) a[1][i] a[1] a 1 i Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in int ans = 0; ans 0 int sum = 0; sum 0 int ptrx = n - 1; ptrx n - 1 n 1 int ptry = -1; ptry -1 1 for (int i = 0; i < 2; ) {
                sum = 0;
                for (int j = i; j <= ptrx; j++) {
                    sum += a[0][j];
                }
                if (ptrx >= 0) {
                    for (int j = ptrx; j < n; j++) {
                        sum += a[1][j];
                    }
                }
                ans = Math.max(ans, sum);
                ptrx--;
                if (ptrx < 0) {
                    i++;
                    ptrx = n - 1;
                }
            } int i = 0; int i = 0; i 0 i < 2 i 2 {
                sum = 0;
                for (int j = i; j <= ptrx; j++) {
                    sum += a[0][j];
                }
                if (ptrx >= 0) {
                    for (int j = ptrx; j < n; j++) {
                        sum += a[1][j];
                    }
                }
                ans = Math.max(ans, sum);
                ptrx--;
                if (ptrx < 0) {
                    i++;
                    ptrx = n - 1;
                }
            } {
                sum = 0;
                for (int j = i; j <= ptrx; j++) {
                    sum += a[0][j];
                }
                if (ptrx >= 0) {
                    for (int j = ptrx; j < n; j++) {
                        sum += a[1][j];
                    }
                }
                ans = Math.max(ans, sum);
                ptrx--;
                if (ptrx < 0) {
                    i++;
                    ptrx = n - 1;
                }
            } sum = 0 sum 0 for (int j = i; j <= ptrx; j++) {
                    sum += a[0][j];
                } int j = i; int j = i; j i j <= ptrx j ptrx j++ j++ j {
                    sum += a[0][j];
                } {
                    sum += a[0][j];
                } sum += a[0][j] sum a[0][j] a[0] a 0 j if (ptrx >= 0) {
                    for (int j = ptrx; j < n; j++) {
                        sum += a[1][j];
                    }
                } ptrx >= 0 ptrx 0 {
                    for (int j = ptrx; j < n; j++) {
                        sum += a[1][j];
                    }
                } for (int j = ptrx; j < n; j++) {
                        sum += a[1][j];
                    } int j = ptrx; int j = ptrx; j ptrx j < n j n j++ j++ j {
                        sum += a[1][j];
                    } {
                        sum += a[1][j];
                    } sum += a[1][j] sum a[1][j] a[1] a 1 j ans = Math.max(ans, sum) ans Math.max(ans, sum) Math.max Math ans sum ptrx-- ptrx if (ptrx < 0) {
                    i++;
                    ptrx = n - 1;
                } ptrx < 0 ptrx 0 {
                    i++;
                    ptrx = n - 1;
                } i++ i ptrx = n - 1 ptrx n - 1 n 1 out.println(ans) out.println out ans int testNumber testNumber Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        C solver = new C();
        solver.solve(1, in, out);
        out.close();
    }

    static class C {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int n = Integer.parseInt(in.next());
            int a[][] = new int[2][n];
            for (int i = 0; i < n; i++) {
                a[0][i] = Integer.parseInt(in.next());
            }
            for (int i = 0; i < n; i++) {
                a[1][i] = Integer.parseInt(in.next());
            }
            int ans = 0;
            int sum = 0;
            int ptrx = n - 1;
            int ptry = -1;

            for (int i = 0; i < 2; ) {
                sum = 0;
                for (int j = i; j <= ptrx; j++) {
                    sum += a[0][j];
                }
                if (ptrx >= 0) {
                    for (int j = ptrx; j < n; j++) {
                        sum += a[1][j];
                    }
                }
                ans = Math.max(ans, sum);
                ptrx--;
                if (ptrx < 0) {
                    i++;
                    ptrx = n - 1;
                }
            }

            // 出力
            out.println(ans);

        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        C solver = new C();
        solver.solve(1, in, out);
        out.close();
    }

    static class C {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int n = Integer.parseInt(in.next());
            int a[][] = new int[2][n];
            for (int i = 0; i < n; i++) {
                a[0][i] = Integer.parseInt(in.next());
            }
            for (int i = 0; i < n; i++) {
                a[1][i] = Integer.parseInt(in.next());
            }
            int ans = 0;
            int sum = 0;
            int ptrx = n - 1;
            int ptry = -1;

            for (int i = 0; i < 2; ) {
                sum = 0;
                for (int j = i; j <= ptrx; j++) {
                    sum += a[0][j];
                }
                if (ptrx >= 0) {
                    for (int j = ptrx; j < n; j++) {
                        sum += a[1][j];
                    }
                }
                ans = Math.max(ans, sum);
                ptrx--;
                if (ptrx < 0) {
                    i++;
                    ptrx = n - 1;
                }
            }

            // 出力
            out.println(ans);

        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        C solver = new C();
        solver.solve(1, in, out);
        out.close();
    }

    static class C {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int n = Integer.parseInt(in.next());
            int a[][] = new int[2][n];
            for (int i = 0; i < n; i++) {
                a[0][i] = Integer.parseInt(in.next());
            }
            for (int i = 0; i < n; i++) {
                a[1][i] = Integer.parseInt(in.next());
            }
            int ans = 0;
            int sum = 0;
            int ptrx = n - 1;
            int ptry = -1;

            for (int i = 0; i < 2; ) {
                sum = 0;
                for (int j = i; j <= ptrx; j++) {
                    sum += a[0][j];
                }
                if (ptrx >= 0) {
                    for (int j = ptrx; j < n; j++) {
                        sum += a[1][j];
                    }
                }
                ans = Math.max(ans, sum);
                ptrx--;
                if (ptrx < 0) {
                    i++;
                    ptrx = n - 1;
                }
            }

            // 出力
            out.println(ans);

        }

    }
}

