
import java.util.Scanner;

public class Main {
    public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int[] array1 = new int[n];
        final int[] array2 = new int[n];

        for (int i = 0; i < n; i++) {
            array1[i] = scanner.nextInt();
        }

        int sum1 = 0;
        for (int i = 0; i < n; i++) {
            final int tmp = scanner.nextInt();
            array2[i] = tmp;
            sum1 += tmp;
        }

        int answer = 0;
        int sum2 = 0;
        for (int i = 0; i < n; i++) {
            sum2 += array1[i];
            answer = Math.max(answer, sum1 + sum2);
            sum1 -= array2[i];
        }

        System.out.println(answer);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int[] array1 = new int[n];
        final int[] array2 = new int[n];

        for (int i = 0; i < n; i++) {
            array1[i] = scanner.nextInt();
        }

        int sum1 = 0;
        for (int i = 0; i < n; i++) {
            final int tmp = scanner.nextInt();
            array2[i] = tmp;
            sum1 += tmp;
        }

        int answer = 0;
        int sum2 = 0;
        for (int i = 0; i < n; i++) {
            sum2 += array1[i];
            answer = Math.max(answer, sum1 + sum2);
            sum1 -= array2[i];
        }

        System.out.println(answer);
    }
} Main public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int[] array1 = new int[n];
        final int[] array2 = new int[n];

        for (int i = 0; i < n; i++) {
            array1[i] = scanner.nextInt();
        }

        int sum1 = 0;
        for (int i = 0; i < n; i++) {
            final int tmp = scanner.nextInt();
            array2[i] = tmp;
            sum1 += tmp;
        }

        int answer = 0;
        int sum2 = 0;
        for (int i = 0; i < n; i++) {
            sum2 += array1[i];
            answer = Math.max(answer, sum1 + sum2);
            sum1 -= array2[i];
        }

        System.out.println(answer);
    } main {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int[] array1 = new int[n];
        final int[] array2 = new int[n];

        for (int i = 0; i < n; i++) {
            array1[i] = scanner.nextInt();
        }

        int sum1 = 0;
        for (int i = 0; i < n; i++) {
            final int tmp = scanner.nextInt();
            array2[i] = tmp;
            sum1 += tmp;
        }

        int answer = 0;
        int sum2 = 0;
        for (int i = 0; i < n; i++) {
            sum2 += array1[i];
            answer = Math.max(answer, sum1 + sum2);
            sum1 -= array2[i];
        }

        System.out.println(answer);
    } final Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) final int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner final int[] array1 = new int[n]; array1 new int[n] n final int[] array2 = new int[n]; array2 new int[n] n for (int i = 0; i < n; i++) {
            array1[i] = scanner.nextInt();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            array1[i] = scanner.nextInt();
        } {
            array1[i] = scanner.nextInt();
        } array1[i] = scanner.nextInt() array1[i] array1 i scanner.nextInt() scanner.nextInt scanner int sum1 = 0; sum1 0 for (int i = 0; i < n; i++) {
            final int tmp = scanner.nextInt();
            array2[i] = tmp;
            sum1 += tmp;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            final int tmp = scanner.nextInt();
            array2[i] = tmp;
            sum1 += tmp;
        } {
            final int tmp = scanner.nextInt();
            array2[i] = tmp;
            sum1 += tmp;
        } final int tmp = scanner.nextInt(); tmp scanner.nextInt() scanner.nextInt scanner array2[i] = tmp array2[i] array2 i tmp sum1 += tmp sum1 tmp int answer = 0; answer 0 int sum2 = 0; sum2 0 for (int i = 0; i < n; i++) {
            sum2 += array1[i];
            answer = Math.max(answer, sum1 + sum2);
            sum1 -= array2[i];
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            sum2 += array1[i];
            answer = Math.max(answer, sum1 + sum2);
            sum1 -= array2[i];
        } {
            sum2 += array1[i];
            answer = Math.max(answer, sum1 + sum2);
            sum1 -= array2[i];
        } sum2 += array1[i] sum2 array1[i] array1 i answer = Math.max(answer, sum1 + sum2) answer Math.max(answer, sum1 + sum2) Math.max Math answer sum1 + sum2 sum1 sum2 sum1 -= array2[i] sum1 array2[i] array2 i System.out.println(answer) System.out.println System.out System System.out answer final String[] args args public class Main {
    public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int[] array1 = new int[n];
        final int[] array2 = new int[n];

        for (int i = 0; i < n; i++) {
            array1[i] = scanner.nextInt();
        }

        int sum1 = 0;
        for (int i = 0; i < n; i++) {
            final int tmp = scanner.nextInt();
            array2[i] = tmp;
            sum1 += tmp;
        }

        int answer = 0;
        int sum2 = 0;
        for (int i = 0; i < n; i++) {
            sum2 += array1[i];
            answer = Math.max(answer, sum1 + sum2);
            sum1 -= array2[i];
        }

        System.out.println(answer);
    }
} public class Main {
    public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int[] array1 = new int[n];
        final int[] array2 = new int[n];

        for (int i = 0; i < n; i++) {
            array1[i] = scanner.nextInt();
        }

        int sum1 = 0;
        for (int i = 0; i < n; i++) {
            final int tmp = scanner.nextInt();
            array2[i] = tmp;
            sum1 += tmp;
        }

        int answer = 0;
        int sum2 = 0;
        for (int i = 0; i < n; i++) {
            sum2 += array1[i];
            answer = Math.max(answer, sum1 + sum2);
            sum1 -= array2[i];
        }

        System.out.println(answer);
    }
} Main

import java.util.Scanner;

public class Main {
    public static void main(final String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final int n = scanner.nextInt();
        final int[] array1 = new int[n];
        final int[] array2 = new int[n];

        for (int i = 0; i < n; i++) {
            array1[i] = scanner.nextInt();
        }

        int sum1 = 0;
        for (int i = 0; i < n; i++) {
            final int tmp = scanner.nextInt();
            array2[i] = tmp;
            sum1 += tmp;
        }

        int answer = 0;
        int sum2 = 0;
        for (int i = 0; i < n; i++) {
            sum2 += array1[i];
            answer = Math.max(answer, sum1 + sum2);
            sum1 -= array2[i];
        }

        System.out.println(answer);
    }
}
