import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = in.nextInt();
            }
        }

        for (int i = 1; i < n; i++) {
            a[0][i] += a[0][i - 1];
        }

        for (int i = n - 2; i >= 0; i--) {
            a[1][i] += a[1][i + 1];
        }

        int ans = 0;
        for (int i = 0; i < n; i++) {
            int total = a[0][i] + a[1][i];
            ans = Math.max(ans, total);
        }

        System.out.println(ans);

    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = in.nextInt();
            }
        }

        for (int i = 1; i < n; i++) {
            a[0][i] += a[0][i - 1];
        }

        for (int i = n - 2; i >= 0; i--) {
            a[1][i] += a[1][i + 1];
        }

        int ans = 0;
        for (int i = 0; i < n; i++) {
            int total = a[0][i] + a[1][i];
            ans = Math.max(ans, total);
        }

        System.out.println(ans);

    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = in.nextInt();
            }
        }

        for (int i = 1; i < n; i++) {
            a[0][i] += a[0][i - 1];
        }

        for (int i = n - 2; i >= 0; i--) {
            a[1][i] += a[1][i + 1];
        }

        int ans = 0;
        for (int i = 0; i < n; i++) {
            int total = a[0][i] + a[1][i];
            ans = Math.max(ans, total);
        }

        System.out.println(ans);

    } main {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = in.nextInt();
            }
        }

        for (int i = 1; i < n; i++) {
            a[0][i] += a[0][i - 1];
        }

        for (int i = n - 2; i >= 0; i--) {
            a[1][i] += a[1][i + 1];
        }

        int ans = 0;
        for (int i = 0; i < n; i++) {
            int total = a[0][i] + a[1][i];
            ans = Math.max(ans, total);
        }

        System.out.println(ans);

    } Scanner in = new Scanner(System.in); 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 i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[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++) {
                a[i][j] = in.nextInt();
            }
        } {
            for (int j = 0; j < n; j++) {
                a[i][j] = in.nextInt();
            }
        } for (int j = 0; j < n; j++) {
                a[i][j] = in.nextInt();
            } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
                a[i][j] = in.nextInt();
            } {
                a[i][j] = in.nextInt();
            } a[i][j] = in.nextInt() a[i][j] a[i] a i j in.nextInt() in.nextInt in for (int i = 1; i < n; i++) {
            a[0][i] += a[0][i - 1];
        } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
            a[0][i] += a[0][i - 1];
        } {
            a[0][i] += a[0][i - 1];
        } a[0][i] += a[0][i - 1] a[0][i] a[0] a 0 i a[0][i - 1] a[0] a 0 i - 1 i 1 for (int i = n - 2; i >= 0; i--) {
            a[1][i] += a[1][i + 1];
        } int i = n - 2; int i = n - 2; i n - 2 n 2 i >= 0 i 0 i-- i-- i {
            a[1][i] += a[1][i + 1];
        } {
            a[1][i] += a[1][i + 1];
        } a[1][i] += a[1][i + 1] a[1][i] a[1] a 1 i a[1][i + 1] a[1] a 1 i + 1 i 1 int ans = 0; ans 0 for (int i = 0; i < n; i++) {
            int total = a[0][i] + a[1][i];
            ans = Math.max(ans, total);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int total = a[0][i] + a[1][i];
            ans = Math.max(ans, total);
        } {
            int total = a[0][i] + a[1][i];
            ans = Math.max(ans, total);
        } int total = a[0][i] + a[1][i]; total a[0][i] + a[1][i] a[0][i] a[0] a 0 i a[1][i] a[1] a 1 i ans = Math.max(ans, total) ans Math.max(ans, total) Math.max Math ans total System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = in.nextInt();
            }
        }

        for (int i = 1; i < n; i++) {
            a[0][i] += a[0][i - 1];
        }

        for (int i = n - 2; i >= 0; i--) {
            a[1][i] += a[1][i + 1];
        }

        int ans = 0;
        for (int i = 0; i < n; i++) {
            int total = a[0][i] + a[1][i];
            ans = Math.max(ans, total);
        }

        System.out.println(ans);

    }
} public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = in.nextInt();
            }
        }

        for (int i = 1; i < n; i++) {
            a[0][i] += a[0][i - 1];
        }

        for (int i = n - 2; i >= 0; i--) {
            a[1][i] += a[1][i + 1];
        }

        int ans = 0;
        for (int i = 0; i < n; i++) {
            int total = a[0][i] + a[1][i];
            ans = Math.max(ans, total);
        }

        System.out.println(ans);

    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = in.nextInt();
            }
        }

        for (int i = 1; i < n; i++) {
            a[0][i] += a[0][i - 1];
        }

        for (int i = n - 2; i >= 0; i--) {
            a[1][i] += a[1][i + 1];
        }

        int ans = 0;
        for (int i = 0; i < n; i++) {
            int total = a[0][i] + a[1][i];
            ans = Math.max(ans, total);
        }

        System.out.println(ans);

    }
}