import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.stream.IntStream;
import java.util.Arrays;
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);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            int[][] map = new int[2][n];
            int max = 0;
            for (int i = 0; i < 2; i++) {
                for (int j = 0; j < n; j++) {
                    map[i][j] = in.nextInt();
                }
            }

            int prev = Arrays.stream(map[1]).sum();
            prev += map[0][0];
            max = prev;
            for (int i = 1; i < n; i++) {
                int tmp = prev;
                tmp += map[0][i] - map[1][i - 1];
                max = Math.max(max, tmp);
                prev = tmp;
            }

            out.print(max);

        }

    }
}
 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.stream.IntStream; IntStream java.util.stream import java.util.Arrays; Arrays java.util 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);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            int[][] map = new int[2][n];
            int max = 0;
            for (int i = 0; i < 2; i++) {
                for (int j = 0; j < n; j++) {
                    map[i][j] = in.nextInt();
                }
            }

            int prev = Arrays.stream(map[1]).sum();
            prev += map[0][0];
            max = prev;
            for (int i = 1; i < n; i++) {
                int tmp = prev;
                tmp += map[0][i] - map[1][i - 1];
                max = Math.max(max, tmp);
                prev = tmp;
            }

            out.print(max);

        }

    }
} 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);
        TaskC solver = new TaskC();
        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);
        TaskC solver = new TaskC();
        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) TaskC solver = new TaskC(); solver new TaskC() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            int[][] map = new int[2][n];
            int max = 0;
            for (int i = 0; i < 2; i++) {
                for (int j = 0; j < n; j++) {
                    map[i][j] = in.nextInt();
                }
            }

            int prev = Arrays.stream(map[1]).sum();
            prev += map[0][0];
            max = prev;
            for (int i = 1; i < n; i++) {
                int tmp = prev;
                tmp += map[0][i] - map[1][i - 1];
                max = Math.max(max, tmp);
                prev = tmp;
            }

            out.print(max);

        }

    } TaskC public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            int[][] map = new int[2][n];
            int max = 0;
            for (int i = 0; i < 2; i++) {
                for (int j = 0; j < n; j++) {
                    map[i][j] = in.nextInt();
                }
            }

            int prev = Arrays.stream(map[1]).sum();
            prev += map[0][0];
            max = prev;
            for (int i = 1; i < n; i++) {
                int tmp = prev;
                tmp += map[0][i] - map[1][i - 1];
                max = Math.max(max, tmp);
                prev = tmp;
            }

            out.print(max);

        } solve {
            int n = in.nextInt();
            int[][] map = new int[2][n];
            int max = 0;
            for (int i = 0; i < 2; i++) {
                for (int j = 0; j < n; j++) {
                    map[i][j] = in.nextInt();
                }
            }

            int prev = Arrays.stream(map[1]).sum();
            prev += map[0][0];
            max = prev;
            for (int i = 1; i < n; i++) {
                int tmp = prev;
                tmp += map[0][i] - map[1][i - 1];
                max = Math.max(max, tmp);
                prev = tmp;
            }

            out.print(max);

        } int n = in.nextInt(); n in.nextInt() in.nextInt in int[][] map = new int[2][n]; map new int[2][n] 2 n int max = 0; max 0 for (int i = 0; i < 2; i++) {
                for (int j = 0; j < n; j++) {
                    map[i][j] = in.nextInt();
                }
            } int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
                for (int j = 0; j < n; j++) {
                    map[i][j] = in.nextInt();
                }
            } {
                for (int j = 0; j < n; j++) {
                    map[i][j] = in.nextInt();
                }
            } for (int j = 0; j < n; j++) {
                    map[i][j] = in.nextInt();
                } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
                    map[i][j] = in.nextInt();
                } {
                    map[i][j] = in.nextInt();
                } map[i][j] = in.nextInt() map[i][j] map[i] map i j in.nextInt() in.nextInt in int prev = Arrays.stream(map[1]).sum(); prev Arrays.stream(map[1]).sum() Arrays.stream(map[1]).sum Arrays.stream(map[1]) Arrays.stream Arrays map[1] map 1 prev += map[0][0] prev map[0][0] map[0] map 0 0 max = prev max prev for (int i = 1; i < n; i++) {
                int tmp = prev;
                tmp += map[0][i] - map[1][i - 1];
                max = Math.max(max, tmp);
                prev = tmp;
            } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
                int tmp = prev;
                tmp += map[0][i] - map[1][i - 1];
                max = Math.max(max, tmp);
                prev = tmp;
            } {
                int tmp = prev;
                tmp += map[0][i] - map[1][i - 1];
                max = Math.max(max, tmp);
                prev = tmp;
            } int tmp = prev; tmp prev tmp += map[0][i] - map[1][i - 1] tmp map[0][i] - map[1][i - 1] map[0][i] map[0] map 0 i map[1][i - 1] map[1] map 1 i - 1 i 1 max = Math.max(max, tmp) max Math.max(max, tmp) Math.max Math max tmp prev = tmp prev tmp out.print(max) out.print out max 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);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            int[][] map = new int[2][n];
            int max = 0;
            for (int i = 0; i < 2; i++) {
                for (int j = 0; j < n; j++) {
                    map[i][j] = in.nextInt();
                }
            }

            int prev = Arrays.stream(map[1]).sum();
            prev += map[0][0];
            max = prev;
            for (int i = 1; i < n; i++) {
                int tmp = prev;
                tmp += map[0][i] - map[1][i - 1];
                max = Math.max(max, tmp);
                prev = tmp;
            }

            out.print(max);

        }

    }
} 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);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            int[][] map = new int[2][n];
            int max = 0;
            for (int i = 0; i < 2; i++) {
                for (int j = 0; j < n; j++) {
                    map[i][j] = in.nextInt();
                }
            }

            int prev = Arrays.stream(map[1]).sum();
            prev += map[0][0];
            max = prev;
            for (int i = 1; i < n; i++) {
                int tmp = prev;
                tmp += map[0][i] - map[1][i - 1];
                max = Math.max(max, tmp);
                prev = tmp;
            }

            out.print(max);

        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.stream.IntStream;
import java.util.Arrays;
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);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            int[][] map = new int[2][n];
            int max = 0;
            for (int i = 0; i < 2; i++) {
                for (int j = 0; j < n; j++) {
                    map[i][j] = in.nextInt();
                }
            }

            int prev = Arrays.stream(map[1]).sum();
            prev += map[0][0];
            max = prev;
            for (int i = 1; i < n; i++) {
                int tmp = prev;
                tmp += map[0][i] - map[1][i - 1];
                max = Math.max(max, tmp);
                prev = tmp;
            }

            out.print(max);

        }

    }
}

