public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);

    public static void main(String[] args) {
        int n = scanner.nextInt();
        int[] sum = new int[n];

        for (int i = 0; i < n; i++)
            sum[i] = (i == 0 ? 0 : sum[i - 1]) + scanner.nextInt();
        for (int i = 0; i < n; i++)
            for (int i1 = 0, temp = scanner.nextInt(); i1 <= i; i1++)
                sum[i1] += temp;

        int ans = sum[0];
        for (int i = 1; i < n; i++)
            ans = Math.max(ans, sum[i]);
        System.out.println(ans);
    }
} public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);

    public static void main(String[] args) {
        int n = scanner.nextInt();
        int[] sum = new int[n];

        for (int i = 0; i < n; i++)
            sum[i] = (i == 0 ? 0 : sum[i - 1]) + scanner.nextInt();
        for (int i = 0; i < n; i++)
            for (int i1 = 0, temp = scanner.nextInt(); i1 <= i; i1++)
                sum[i1] += temp;

        int ans = sum[0];
        for (int i = 1; i < n; i++)
            ans = Math.max(ans, sum[i]);
        System.out.println(ans);
    }
} Main private static java.util.Scanner scanner = new java.util.Scanner(System.in); scanner new java.util.Scanner(System.in) public static void main(String[] args) {
        int n = scanner.nextInt();
        int[] sum = new int[n];

        for (int i = 0; i < n; i++)
            sum[i] = (i == 0 ? 0 : sum[i - 1]) + scanner.nextInt();
        for (int i = 0; i < n; i++)
            for (int i1 = 0, temp = scanner.nextInt(); i1 <= i; i1++)
                sum[i1] += temp;

        int ans = sum[0];
        for (int i = 1; i < n; i++)
            ans = Math.max(ans, sum[i]);
        System.out.println(ans);
    } main {
        int n = scanner.nextInt();
        int[] sum = new int[n];

        for (int i = 0; i < n; i++)
            sum[i] = (i == 0 ? 0 : sum[i - 1]) + scanner.nextInt();
        for (int i = 0; i < n; i++)
            for (int i1 = 0, temp = scanner.nextInt(); i1 <= i; i1++)
                sum[i1] += temp;

        int ans = sum[0];
        for (int i = 1; i < n; i++)
            ans = Math.max(ans, sum[i]);
        System.out.println(ans);
    } int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int[] sum = new int[n]; sum new int[n] n for (int i = 0; i < n; i++)
            sum[i] = (i == 0 ? 0 : sum[i - 1]) + scanner.nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i sum[i] = (i == 0 ? 0 : sum[i - 1]) + scanner.nextInt(); sum[i] = (i == 0 ? 0 : sum[i - 1]) + scanner.nextInt() sum[i] sum i (i == 0 ? 0 : sum[i - 1]) + scanner.nextInt() (i == 0 ? 0 : sum[i - 1]) i == 0 i 0 0 sum[i - 1] sum i - 1 i 1 scanner.nextInt() scanner.nextInt scanner for (int i = 0; i < n; i++)
            for (int i1 = 0, temp = scanner.nextInt(); i1 <= i; i1++)
                sum[i1] += temp; int i = 0; int i = 0; i 0 i < n i n i++ i++ i for (int i1 = 0, temp = scanner.nextInt(); i1 <= i; i1++)
                sum[i1] += temp; for (int i1 = 0, temp = scanner.nextInt(); i1 <= i; i1++)
                sum[i1] += temp; int i1 = 0, temp = scanner.nextInt(); int i1 = 0 i1 0 temp = scanner.nextInt(); temp scanner.nextInt() scanner.nextInt scanner i1 <= i i1 i i1++ i1++ i1 sum[i1] += temp; sum[i1] += temp sum[i1] sum i1 temp int ans = sum[0]; ans sum[0] sum 0 for (int i = 1; i < n; i++)
            ans = Math.max(ans, sum[i]); int i = 1; int i = 1; i 1 i < n i n i++ i++ i ans = Math.max(ans, sum[i]); ans = Math.max(ans, sum[i]) ans Math.max(ans, sum[i]) Math.max Math ans sum[i] sum i System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);

    public static void main(String[] args) {
        int n = scanner.nextInt();
        int[] sum = new int[n];

        for (int i = 0; i < n; i++)
            sum[i] = (i == 0 ? 0 : sum[i - 1]) + scanner.nextInt();
        for (int i = 0; i < n; i++)
            for (int i1 = 0, temp = scanner.nextInt(); i1 <= i; i1++)
                sum[i1] += temp;

        int ans = sum[0];
        for (int i = 1; i < n; i++)
            ans = Math.max(ans, sum[i]);
        System.out.println(ans);
    }
} public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);

    public static void main(String[] args) {
        int n = scanner.nextInt();
        int[] sum = new int[n];

        for (int i = 0; i < n; i++)
            sum[i] = (i == 0 ? 0 : sum[i - 1]) + scanner.nextInt();
        for (int i = 0; i < n; i++)
            for (int i1 = 0, temp = scanner.nextInt(); i1 <= i; i1++)
                sum[i1] += temp;

        int ans = sum[0];
        for (int i = 1; i < n; i++)
            ans = Math.max(ans, sum[i]);
        System.out.println(ans);
    }
} Main
public class Main {
    private static java.util.Scanner scanner = new java.util.Scanner(System.in);

    public static void main(String[] args) {
        int n = scanner.nextInt();
        int[] sum = new int[n];

        for (int i = 0; i < n; i++)
            sum[i] = (i == 0 ? 0 : sum[i - 1]) + scanner.nextInt();
        for (int i = 0; i < n; i++)
            for (int i1 = 0, temp = scanner.nextInt(); i1 <= i; i1++)
                sum[i1] += temp;

        int ans = sum[0];
        for (int i = 1; i < n; i++)
            ans = Math.max(ans, sum[i]);
        System.out.println(ans);
    }
}