import java.util.Scanner;

public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();

            int[][] A = new int[2][N];
            for (int r = 0; r < 2; r++) {
                for (int c = 0; c < N; c++) {
                    A[r][c] = in.nextInt();
                }
            }

            int max = 0;
            for (int c = 0; c < N; c++) {
                int count = 0;
                for (int c2 = 0; c2 < N; c2++) {
                    if (c2 < c) {
                        count += A[0][c2];
                    } else if (c2 == c) {
                        count += A[0][c2];
                        count += A[1][c2];
                    } else {
                        count += A[1][c2];
                    }
                }
                max = Math.max(max, count);
            }
            System.out.println(max);
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();

            int[][] A = new int[2][N];
            for (int r = 0; r < 2; r++) {
                for (int c = 0; c < N; c++) {
                    A[r][c] = in.nextInt();
                }
            }

            int max = 0;
            for (int c = 0; c < N; c++) {
                int count = 0;
                for (int c2 = 0; c2 < N; c2++) {
                    if (c2 < c) {
                        count += A[0][c2];
                    } else if (c2 == c) {
                        count += A[0][c2];
                        count += A[1][c2];
                    } else {
                        count += A[1][c2];
                    }
                }
                max = Math.max(max, count);
            }
            System.out.println(max);
        }
    }
} Main public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();

            int[][] A = new int[2][N];
            for (int r = 0; r < 2; r++) {
                for (int c = 0; c < N; c++) {
                    A[r][c] = in.nextInt();
                }
            }

            int max = 0;
            for (int c = 0; c < N; c++) {
                int count = 0;
                for (int c2 = 0; c2 < N; c2++) {
                    if (c2 < c) {
                        count += A[0][c2];
                    } else if (c2 == c) {
                        count += A[0][c2];
                        count += A[1][c2];
                    } else {
                        count += A[1][c2];
                    }
                }
                max = Math.max(max, count);
            }
            System.out.println(max);
        }
    } main {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();

            int[][] A = new int[2][N];
            for (int r = 0; r < 2; r++) {
                for (int c = 0; c < N; c++) {
                    A[r][c] = in.nextInt();
                }
            }

            int max = 0;
            for (int c = 0; c < N; c++) {
                int count = 0;
                for (int c2 = 0; c2 < N; c2++) {
                    if (c2 < c) {
                        count += A[0][c2];
                    } else if (c2 == c) {
                        count += A[0][c2];
                        count += A[1][c2];
                    } else {
                        count += A[1][c2];
                    }
                }
                max = Math.max(max, count);
            }
            System.out.println(max);
        }
    } try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();

            int[][] A = new int[2][N];
            for (int r = 0; r < 2; r++) {
                for (int c = 0; c < N; c++) {
                    A[r][c] = in.nextInt();
                }
            }

            int max = 0;
            for (int c = 0; c < N; c++) {
                int count = 0;
                for (int c2 = 0; c2 < N; c2++) {
                    if (c2 < c) {
                        count += A[0][c2];
                    } else if (c2 == c) {
                        count += A[0][c2];
                        count += A[1][c2];
                    } else {
                        count += A[1][c2];
                    }
                }
                max = Math.max(max, count);
            }
            System.out.println(max);
        } {
            int N = in.nextInt();

            int[][] A = new int[2][N];
            for (int r = 0; r < 2; r++) {
                for (int c = 0; c < N; c++) {
                    A[r][c] = in.nextInt();
                }
            }

            int max = 0;
            for (int c = 0; c < N; c++) {
                int count = 0;
                for (int c2 = 0; c2 < N; c2++) {
                    if (c2 < c) {
                        count += A[0][c2];
                    } else if (c2 == c) {
                        count += A[0][c2];
                        count += A[1][c2];
                    } else {
                        count += A[1][c2];
                    }
                }
                max = Math.max(max, count);
            }
            System.out.println(max);
        } Scanner in = new Scanner(System.in) Scanner in = new Scanner(System.in) new Scanner(System.in) int N = in.nextInt(); N in.nextInt() in.nextInt in int[][] A = new int[2][N]; A new int[2][N] 2 N for (int r = 0; r < 2; r++) {
                for (int c = 0; c < N; c++) {
                    A[r][c] = in.nextInt();
                }
            } int r = 0; int r = 0; r 0 r < 2 r 2 r++ r++ r {
                for (int c = 0; c < N; c++) {
                    A[r][c] = in.nextInt();
                }
            } {
                for (int c = 0; c < N; c++) {
                    A[r][c] = in.nextInt();
                }
            } for (int c = 0; c < N; c++) {
                    A[r][c] = in.nextInt();
                } int c = 0; int c = 0; c 0 c < N c N c++ c++ c {
                    A[r][c] = in.nextInt();
                } {
                    A[r][c] = in.nextInt();
                } A[r][c] = in.nextInt() A[r][c] A[r] A r c in.nextInt() in.nextInt in int max = 0; max 0 for (int c = 0; c < N; c++) {
                int count = 0;
                for (int c2 = 0; c2 < N; c2++) {
                    if (c2 < c) {
                        count += A[0][c2];
                    } else if (c2 == c) {
                        count += A[0][c2];
                        count += A[1][c2];
                    } else {
                        count += A[1][c2];
                    }
                }
                max = Math.max(max, count);
            } int c = 0; int c = 0; c 0 c < N c N c++ c++ c {
                int count = 0;
                for (int c2 = 0; c2 < N; c2++) {
                    if (c2 < c) {
                        count += A[0][c2];
                    } else if (c2 == c) {
                        count += A[0][c2];
                        count += A[1][c2];
                    } else {
                        count += A[1][c2];
                    }
                }
                max = Math.max(max, count);
            } {
                int count = 0;
                for (int c2 = 0; c2 < N; c2++) {
                    if (c2 < c) {
                        count += A[0][c2];
                    } else if (c2 == c) {
                        count += A[0][c2];
                        count += A[1][c2];
                    } else {
                        count += A[1][c2];
                    }
                }
                max = Math.max(max, count);
            } int count = 0; count 0 for (int c2 = 0; c2 < N; c2++) {
                    if (c2 < c) {
                        count += A[0][c2];
                    } else if (c2 == c) {
                        count += A[0][c2];
                        count += A[1][c2];
                    } else {
                        count += A[1][c2];
                    }
                } int c2 = 0; int c2 = 0; c2 0 c2 < N c2 N c2++ c2++ c2 {
                    if (c2 < c) {
                        count += A[0][c2];
                    } else if (c2 == c) {
                        count += A[0][c2];
                        count += A[1][c2];
                    } else {
                        count += A[1][c2];
                    }
                } {
                    if (c2 < c) {
                        count += A[0][c2];
                    } else if (c2 == c) {
                        count += A[0][c2];
                        count += A[1][c2];
                    } else {
                        count += A[1][c2];
                    }
                } if (c2 < c) {
                        count += A[0][c2];
                    } else if (c2 == c) {
                        count += A[0][c2];
                        count += A[1][c2];
                    } else {
                        count += A[1][c2];
                    } c2 < c c2 c {
                        count += A[0][c2];
                    } count += A[0][c2] count A[0][c2] A[0] A 0 c2 if (c2 == c) {
                        count += A[0][c2];
                        count += A[1][c2];
                    } else {
                        count += A[1][c2];
                    } c2 == c c2 c {
                        count += A[0][c2];
                        count += A[1][c2];
                    } count += A[0][c2] count A[0][c2] A[0] A 0 c2 count += A[1][c2] count A[1][c2] A[1] A 1 c2 {
                        count += A[1][c2];
                    } count += A[1][c2] count A[1][c2] A[1] A 1 c2 max = Math.max(max, count) max Math.max(max, count) Math.max Math max count System.out.println(max) System.out.println System.out System System.out max String args[] args public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();

            int[][] A = new int[2][N];
            for (int r = 0; r < 2; r++) {
                for (int c = 0; c < N; c++) {
                    A[r][c] = in.nextInt();
                }
            }

            int max = 0;
            for (int c = 0; c < N; c++) {
                int count = 0;
                for (int c2 = 0; c2 < N; c2++) {
                    if (c2 < c) {
                        count += A[0][c2];
                    } else if (c2 == c) {
                        count += A[0][c2];
                        count += A[1][c2];
                    } else {
                        count += A[1][c2];
                    }
                }
                max = Math.max(max, count);
            }
            System.out.println(max);
        }
    }
} public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();

            int[][] A = new int[2][N];
            for (int r = 0; r < 2; r++) {
                for (int c = 0; c < N; c++) {
                    A[r][c] = in.nextInt();
                }
            }

            int max = 0;
            for (int c = 0; c < N; c++) {
                int count = 0;
                for (int c2 = 0; c2 < N; c2++) {
                    if (c2 < c) {
                        count += A[0][c2];
                    } else if (c2 == c) {
                        count += A[0][c2];
                        count += A[1][c2];
                    } else {
                        count += A[1][c2];
                    }
                }
                max = Math.max(max, count);
            }
            System.out.println(max);
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();

            int[][] A = new int[2][N];
            for (int r = 0; r < 2; r++) {
                for (int c = 0; c < N; c++) {
                    A[r][c] = in.nextInt();
                }
            }

            int max = 0;
            for (int c = 0; c < N; c++) {
                int count = 0;
                for (int c2 = 0; c2 < N; c2++) {
                    if (c2 < c) {
                        count += A[0][c2];
                    } else if (c2 == c) {
                        count += A[0][c2];
                        count += A[1][c2];
                    } else {
                        count += A[1][c2];
                    }
                }
                max = Math.max(max, count);
            }
            System.out.println(max);
        }
    }
}
