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

/**
 * 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;
                InputReader in = new InputReader(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, InputReader in, PrintWriter out) {
                        int n = in.i();
                        int[] a = in.ia(n);
                        int[] b = in.ia(n);
                        int[] f = new int[n + 1];
                        int[] s = new int[n + 1];
                        for (int i = 1; i <= n; i++) f[i] = f[i - 1] + a[i - 1];
                        for (int i = 1; i <= n; i++) {
                                s[i] = s[i - 1] + b[i - 1];
                        }
                        long ans = 0;
                        for (int i = 1; i <= n; i++) {
                                ans = Math.max(ans, f[i] + s[n] - s[i - 1]);
                        }
                        out.println(ans);
                }

        }

        static class InputReader {
                InputStream is;
                private byte[] inbuf = new byte[1024];
                public int lenbuf = 0;
                public int ptrbuf = 0;

                public InputReader(InputStream is) {
                        this.is = is;
                }

                private int readByte() {
                        if (lenbuf == -1) throw new InputMismatchException();
                        if (ptrbuf >= lenbuf) {
                                ptrbuf = 0;
                                try {
                                        lenbuf = is.read(inbuf);
                                } catch (IOException e) {
                                        throw new InputMismatchException();
                                }
                                if (lenbuf <= 0) return -1;
                        }
                        return inbuf[ptrbuf++];
                }

                public int[] ia(int n) {
                        int[] a = new int[n];
                        for (int i = 0; i < n; i++) a[i] = i();
                        return a;
                }

                public int i() {
                        int num = 0, b;
                        boolean minus = false;
                        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
                        if (b == '-') {
                                minus = true;
                                b = readByte();
                        }

                        while (true) {
                                if (b >= '0' && b <= '9') {
                                        num = num * 10 + (b - '0');
                                } else {
                                        return minus ? -num : num;
                                }
                                b = readByte();
                        }
                }

        }
}
 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.InputMismatchException; InputMismatchException java.util import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io public class Main {
        public static void main(String[] args) {
                InputStream inputStream = System.in;
                OutputStream outputStream = System.out;
                InputReader in = new InputReader(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, InputReader in, PrintWriter out) {
                        int n = in.i();
                        int[] a = in.ia(n);
                        int[] b = in.ia(n);
                        int[] f = new int[n + 1];
                        int[] s = new int[n + 1];
                        for (int i = 1; i <= n; i++) f[i] = f[i - 1] + a[i - 1];
                        for (int i = 1; i <= n; i++) {
                                s[i] = s[i - 1] + b[i - 1];
                        }
                        long ans = 0;
                        for (int i = 1; i <= n; i++) {
                                ans = Math.max(ans, f[i] + s[n] - s[i - 1]);
                        }
                        out.println(ans);
                }

        }

        static class InputReader {
                InputStream is;
                private byte[] inbuf = new byte[1024];
                public int lenbuf = 0;
                public int ptrbuf = 0;

                public InputReader(InputStream is) {
                        this.is = is;
                }

                private int readByte() {
                        if (lenbuf == -1) throw new InputMismatchException();
                        if (ptrbuf >= lenbuf) {
                                ptrbuf = 0;
                                try {
                                        lenbuf = is.read(inbuf);
                                } catch (IOException e) {
                                        throw new InputMismatchException();
                                }
                                if (lenbuf <= 0) return -1;
                        }
                        return inbuf[ptrbuf++];
                }

                public int[] ia(int n) {
                        int[] a = new int[n];
                        for (int i = 0; i < n; i++) a[i] = i();
                        return a;
                }

                public int i() {
                        int num = 0, b;
                        boolean minus = false;
                        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
                        if (b == '-') {
                                minus = true;
                                b = readByte();
                        }

                        while (true) {
                                if (b >= '0' && b <= '9') {
                                        num = num * 10 + (b - '0');
                                } else {
                                        return minus ? -num : num;
                                }
                                b = readByte();
                        }
                }

        }
} Main public static void main(String[] args) {
                InputStream inputStream = System.in;
                OutputStream outputStream = System.out;
                InputReader in = new InputReader(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;
                InputReader in = new InputReader(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 InputReader in = new InputReader(inputStream); in new InputReader(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, InputReader in, PrintWriter out) {
                        int n = in.i();
                        int[] a = in.ia(n);
                        int[] b = in.ia(n);
                        int[] f = new int[n + 1];
                        int[] s = new int[n + 1];
                        for (int i = 1; i <= n; i++) f[i] = f[i - 1] + a[i - 1];
                        for (int i = 1; i <= n; i++) {
                                s[i] = s[i - 1] + b[i - 1];
                        }
                        long ans = 0;
                        for (int i = 1; i <= n; i++) {
                                ans = Math.max(ans, f[i] + s[n] - s[i - 1]);
                        }
                        out.println(ans);
                }

        } TaskC public void solve(int testNumber, InputReader in, PrintWriter out) {
                        int n = in.i();
                        int[] a = in.ia(n);
                        int[] b = in.ia(n);
                        int[] f = new int[n + 1];
                        int[] s = new int[n + 1];
                        for (int i = 1; i <= n; i++) f[i] = f[i - 1] + a[i - 1];
                        for (int i = 1; i <= n; i++) {
                                s[i] = s[i - 1] + b[i - 1];
                        }
                        long ans = 0;
                        for (int i = 1; i <= n; i++) {
                                ans = Math.max(ans, f[i] + s[n] - s[i - 1]);
                        }
                        out.println(ans);
                } solve {
                        int n = in.i();
                        int[] a = in.ia(n);
                        int[] b = in.ia(n);
                        int[] f = new int[n + 1];
                        int[] s = new int[n + 1];
                        for (int i = 1; i <= n; i++) f[i] = f[i - 1] + a[i - 1];
                        for (int i = 1; i <= n; i++) {
                                s[i] = s[i - 1] + b[i - 1];
                        }
                        long ans = 0;
                        for (int i = 1; i <= n; i++) {
                                ans = Math.max(ans, f[i] + s[n] - s[i - 1]);
                        }
                        out.println(ans);
                } int n = in.i(); n in.i() in.i in int[] a = in.ia(n); a in.ia(n) in.ia in n int[] b = in.ia(n); b in.ia(n) in.ia in n int[] f = new int[n + 1]; f new int[n + 1] n + 1 n 1 int[] s = new int[n + 1]; s new int[n + 1] n + 1 n 1 for (int i = 1; i <= n; i++) f[i] = f[i - 1] + a[i - 1]; int i = 1; int i = 1; i 1 i <= n i n i++ i++ i f[i] = f[i - 1] + a[i - 1]; f[i] = f[i - 1] + a[i - 1] f[i] f i f[i - 1] + a[i - 1] f[i - 1] f i - 1 i 1 a[i - 1] a i - 1 i 1 for (int i = 1; i <= n; i++) {
                                s[i] = s[i - 1] + b[i - 1];
                        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
                                s[i] = s[i - 1] + b[i - 1];
                        } {
                                s[i] = s[i - 1] + b[i - 1];
                        } s[i] = s[i - 1] + b[i - 1] s[i] s i s[i - 1] + b[i - 1] s[i - 1] s i - 1 i 1 b[i - 1] b i - 1 i 1 long ans = 0; ans 0 for (int i = 1; i <= n; i++) {
                                ans = Math.max(ans, f[i] + s[n] - s[i - 1]);
                        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
                                ans = Math.max(ans, f[i] + s[n] - s[i - 1]);
                        } {
                                ans = Math.max(ans, f[i] + s[n] - s[i - 1]);
                        } ans = Math.max(ans, f[i] + s[n] - s[i - 1]) ans Math.max(ans, f[i] + s[n] - s[i - 1]) Math.max Math ans f[i] + s[n] - s[i - 1] f[i] + s[n] f[i] f i s[n] s n s[i - 1] s i - 1 i 1 out.println(ans) out.println out ans int testNumber testNumber InputReader in in PrintWriter out out static class InputReader {
                InputStream is;
                private byte[] inbuf = new byte[1024];
                public int lenbuf = 0;
                public int ptrbuf = 0;

                public InputReader(InputStream is) {
                        this.is = is;
                }

                private int readByte() {
                        if (lenbuf == -1) throw new InputMismatchException();
                        if (ptrbuf >= lenbuf) {
                                ptrbuf = 0;
                                try {
                                        lenbuf = is.read(inbuf);
                                } catch (IOException e) {
                                        throw new InputMismatchException();
                                }
                                if (lenbuf <= 0) return -1;
                        }
                        return inbuf[ptrbuf++];
                }

                public int[] ia(int n) {
                        int[] a = new int[n];
                        for (int i = 0; i < n; i++) a[i] = i();
                        return a;
                }

                public int i() {
                        int num = 0, b;
                        boolean minus = false;
                        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
                        if (b == '-') {
                                minus = true;
                                b = readByte();
                        }

                        while (true) {
                                if (b >= '0' && b <= '9') {
                                        num = num * 10 + (b - '0');
                                } else {
                                        return minus ? -num : num;
                                }
                                b = readByte();
                        }
                }

        } InputReader InputStream is; is private byte[] inbuf = new byte[1024]; inbuf new byte[1024] 1024 public int lenbuf = 0; lenbuf 0 public int ptrbuf = 0; ptrbuf 0 public InputReader(InputStream is) {
                        this.is = is;
                } InputReader {
                        this.is = is;
                } this.is = is this.is this this.is is InputStream is is private int readByte() {
                        if (lenbuf == -1) throw new InputMismatchException();
                        if (ptrbuf >= lenbuf) {
                                ptrbuf = 0;
                                try {
                                        lenbuf = is.read(inbuf);
                                } catch (IOException e) {
                                        throw new InputMismatchException();
                                }
                                if (lenbuf <= 0) return -1;
                        }
                        return inbuf[ptrbuf++];
                } readByte {
                        if (lenbuf == -1) throw new InputMismatchException();
                        if (ptrbuf >= lenbuf) {
                                ptrbuf = 0;
                                try {
                                        lenbuf = is.read(inbuf);
                                } catch (IOException e) {
                                        throw new InputMismatchException();
                                }
                                if (lenbuf <= 0) return -1;
                        }
                        return inbuf[ptrbuf++];
                } if (lenbuf == -1) throw new InputMismatchException(); lenbuf == -1 lenbuf -1 1 throw new InputMismatchException(); new InputMismatchException() if (ptrbuf >= lenbuf) {
                                ptrbuf = 0;
                                try {
                                        lenbuf = is.read(inbuf);
                                } catch (IOException e) {
                                        throw new InputMismatchException();
                                }
                                if (lenbuf <= 0) return -1;
                        } ptrbuf >= lenbuf ptrbuf lenbuf {
                                ptrbuf = 0;
                                try {
                                        lenbuf = is.read(inbuf);
                                } catch (IOException e) {
                                        throw new InputMismatchException();
                                }
                                if (lenbuf <= 0) return -1;
                        } ptrbuf = 0 ptrbuf 0 try {
                                        lenbuf = is.read(inbuf);
                                } catch (IOException e) {
                                        throw new InputMismatchException();
                                } catch (IOException e) {
                                        throw new InputMismatchException();
                                } IOException e {
                                        throw new InputMismatchException();
                                } throw new InputMismatchException(); new InputMismatchException() {
                                        lenbuf = is.read(inbuf);
                                } lenbuf = is.read(inbuf) lenbuf is.read(inbuf) is.read is inbuf if (lenbuf <= 0) return -1; lenbuf <= 0 lenbuf 0 return -1; -1 1 return inbuf[ptrbuf++]; inbuf[ptrbuf++] inbuf ptrbuf++ ptrbuf public int[] ia(int n) {
                        int[] a = new int[n];
                        for (int i = 0; i < n; i++) a[i] = i();
                        return a;
                } ia {
                        int[] a = new int[n];
                        for (int i = 0; i < n; i++) a[i] = i();
                        return a;
                } int[] a = new int[n]; a new int[n] n for (int i = 0; i < n; i++) a[i] = i(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i a[i] = i(); a[i] = i() a[i] a i i() i return a; a int n n public int i() {
                        int num = 0, b;
                        boolean minus = false;
                        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
                        if (b == '-') {
                                minus = true;
                                b = readByte();
                        }

                        while (true) {
                                if (b >= '0' && b <= '9') {
                                        num = num * 10 + (b - '0');
                                } else {
                                        return minus ? -num : num;
                                }
                                b = readByte();
                        }
                } i {
                        int num = 0, b;
                        boolean minus = false;
                        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
                        if (b == '-') {
                                minus = true;
                                b = readByte();
                        }

                        while (true) {
                                if (b >= '0' && b <= '9') {
                                        num = num * 10 + (b - '0');
                                } else {
                                        return minus ? -num : num;
                                }
                                b = readByte();
                        }
                } int num = 0 num 0 b; b boolean minus = false; minus false while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ; (b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-') (b = readByte()) != -1 (b = readByte()) b readByte() readByte -1 1 !((b >= '0' && b <= '9') || b == '-') ((b >= '0' && b <= '9') || b == '-') (b >= '0' && b <= '9') b >= '0' b '0' b <= '9' b '9' b == '-' b '-' if (b == '-') {
                                minus = true;
                                b = readByte();
                        } b == '-' b '-' {
                                minus = true;
                                b = readByte();
                        } minus = true minus true b = readByte() b readByte() readByte while (true) {
                                if (b >= '0' && b <= '9') {
                                        num = num * 10 + (b - '0');
                                } else {
                                        return minus ? -num : num;
                                }
                                b = readByte();
                        } true {
                                if (b >= '0' && b <= '9') {
                                        num = num * 10 + (b - '0');
                                } else {
                                        return minus ? -num : num;
                                }
                                b = readByte();
                        } if (b >= '0' && b <= '9') {
                                        num = num * 10 + (b - '0');
                                } else {
                                        return minus ? -num : num;
                                } b >= '0' && b <= '9' b >= '0' b '0' b <= '9' b '9' {
                                        num = num * 10 + (b - '0');
                                } num = num * 10 + (b - '0') num num * 10 + (b - '0') num * 10 num 10 (b - '0') b '0' {
                                        return minus ? -num : num;
                                } return minus ? -num : num; minus ? -num : num minus -num num num b = readByte() b readByte() readByte public class Main {
        public static void main(String[] args) {
                InputStream inputStream = System.in;
                OutputStream outputStream = System.out;
                InputReader in = new InputReader(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, InputReader in, PrintWriter out) {
                        int n = in.i();
                        int[] a = in.ia(n);
                        int[] b = in.ia(n);
                        int[] f = new int[n + 1];
                        int[] s = new int[n + 1];
                        for (int i = 1; i <= n; i++) f[i] = f[i - 1] + a[i - 1];
                        for (int i = 1; i <= n; i++) {
                                s[i] = s[i - 1] + b[i - 1];
                        }
                        long ans = 0;
                        for (int i = 1; i <= n; i++) {
                                ans = Math.max(ans, f[i] + s[n] - s[i - 1]);
                        }
                        out.println(ans);
                }

        }

        static class InputReader {
                InputStream is;
                private byte[] inbuf = new byte[1024];
                public int lenbuf = 0;
                public int ptrbuf = 0;

                public InputReader(InputStream is) {
                        this.is = is;
                }

                private int readByte() {
                        if (lenbuf == -1) throw new InputMismatchException();
                        if (ptrbuf >= lenbuf) {
                                ptrbuf = 0;
                                try {
                                        lenbuf = is.read(inbuf);
                                } catch (IOException e) {
                                        throw new InputMismatchException();
                                }
                                if (lenbuf <= 0) return -1;
                        }
                        return inbuf[ptrbuf++];
                }

                public int[] ia(int n) {
                        int[] a = new int[n];
                        for (int i = 0; i < n; i++) a[i] = i();
                        return a;
                }

                public int i() {
                        int num = 0, b;
                        boolean minus = false;
                        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
                        if (b == '-') {
                                minus = true;
                                b = readByte();
                        }

                        while (true) {
                                if (b >= '0' && b <= '9') {
                                        num = num * 10 + (b - '0');
                                } else {
                                        return minus ? -num : num;
                                }
                                b = readByte();
                        }
                }

        }
} public class Main {
        public static void main(String[] args) {
                InputStream inputStream = System.in;
                OutputStream outputStream = System.out;
                InputReader in = new InputReader(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, InputReader in, PrintWriter out) {
                        int n = in.i();
                        int[] a = in.ia(n);
                        int[] b = in.ia(n);
                        int[] f = new int[n + 1];
                        int[] s = new int[n + 1];
                        for (int i = 1; i <= n; i++) f[i] = f[i - 1] + a[i - 1];
                        for (int i = 1; i <= n; i++) {
                                s[i] = s[i - 1] + b[i - 1];
                        }
                        long ans = 0;
                        for (int i = 1; i <= n; i++) {
                                ans = Math.max(ans, f[i] + s[n] - s[i - 1]);
                        }
                        out.println(ans);
                }

        }

        static class InputReader {
                InputStream is;
                private byte[] inbuf = new byte[1024];
                public int lenbuf = 0;
                public int ptrbuf = 0;

                public InputReader(InputStream is) {
                        this.is = is;
                }

                private int readByte() {
                        if (lenbuf == -1) throw new InputMismatchException();
                        if (ptrbuf >= lenbuf) {
                                ptrbuf = 0;
                                try {
                                        lenbuf = is.read(inbuf);
                                } catch (IOException e) {
                                        throw new InputMismatchException();
                                }
                                if (lenbuf <= 0) return -1;
                        }
                        return inbuf[ptrbuf++];
                }

                public int[] ia(int n) {
                        int[] a = new int[n];
                        for (int i = 0; i < n; i++) a[i] = i();
                        return a;
                }

                public int i() {
                        int num = 0, b;
                        boolean minus = false;
                        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
                        if (b == '-') {
                                minus = true;
                                b = readByte();
                        }

                        while (true) {
                                if (b >= '0' && b <= '9') {
                                        num = num * 10 + (b - '0');
                                } else {
                                        return minus ? -num : num;
                                }
                                b = readByte();
                        }
                }

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

/**
 * 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;
                InputReader in = new InputReader(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, InputReader in, PrintWriter out) {
                        int n = in.i();
                        int[] a = in.ia(n);
                        int[] b = in.ia(n);
                        int[] f = new int[n + 1];
                        int[] s = new int[n + 1];
                        for (int i = 1; i <= n; i++) f[i] = f[i - 1] + a[i - 1];
                        for (int i = 1; i <= n; i++) {
                                s[i] = s[i - 1] + b[i - 1];
                        }
                        long ans = 0;
                        for (int i = 1; i <= n; i++) {
                                ans = Math.max(ans, f[i] + s[n] - s[i - 1]);
                        }
                        out.println(ans);
                }

        }

        static class InputReader {
                InputStream is;
                private byte[] inbuf = new byte[1024];
                public int lenbuf = 0;
                public int ptrbuf = 0;

                public InputReader(InputStream is) {
                        this.is = is;
                }

                private int readByte() {
                        if (lenbuf == -1) throw new InputMismatchException();
                        if (ptrbuf >= lenbuf) {
                                ptrbuf = 0;
                                try {
                                        lenbuf = is.read(inbuf);
                                } catch (IOException e) {
                                        throw new InputMismatchException();
                                }
                                if (lenbuf <= 0) return -1;
                        }
                        return inbuf[ptrbuf++];
                }

                public int[] ia(int n) {
                        int[] a = new int[n];
                        for (int i = 0; i < n; i++) a[i] = i();
                        return a;
                }

                public int i() {
                        int num = 0, b;
                        boolean minus = false;
                        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
                        if (b == '-') {
                                minus = true;
                                b = readByte();
                        }

                        while (true) {
                                if (b >= '0' && b <= '9') {
                                        num = num * 10 + (b - '0');
                                } else {
                                        return minus ? -num : num;
                                }
                                b = readByte();
                        }
                }

        }
}

