import java.util.Arrays;
import java.util.Scanner;
import java.util.stream.IntStream;

public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] field = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                field[i][j] = sc.nextInt();
            }
        }
        int[] array = new int[n];
        for (int i = 0; i < n; i++) {
            array[i] = IntStream.of(Arrays.copyOfRange(field[0], 0, i + 1)).sum();
            array[i] += IntStream.of(Arrays.copyOfRange(field[1], i, n)).sum();
        }
        System.out.println(Arrays.stream(array).max().getAsInt());
    }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util import java.util.stream.IntStream; IntStream java.util.stream public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] field = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                field[i][j] = sc.nextInt();
            }
        }
        int[] array = new int[n];
        for (int i = 0; i < n; i++) {
            array[i] = IntStream.of(Arrays.copyOfRange(field[0], 0, i + 1)).sum();
            array[i] += IntStream.of(Arrays.copyOfRange(field[1], i, n)).sum();
        }
        System.out.println(Arrays.stream(array).max().getAsInt());
    }
} Main public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] field = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                field[i][j] = sc.nextInt();
            }
        }
        int[] array = new int[n];
        for (int i = 0; i < n; i++) {
            array[i] = IntStream.of(Arrays.copyOfRange(field[0], 0, i + 1)).sum();
            array[i] += IntStream.of(Arrays.copyOfRange(field[1], i, n)).sum();
        }
        System.out.println(Arrays.stream(array).max().getAsInt());
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] field = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                field[i][j] = sc.nextInt();
            }
        }
        int[] array = new int[n];
        for (int i = 0; i < n; i++) {
            array[i] = IntStream.of(Arrays.copyOfRange(field[0], 0, i + 1)).sum();
            array[i] += IntStream.of(Arrays.copyOfRange(field[1], i, n)).sum();
        }
        System.out.println(Arrays.stream(array).max().getAsInt());
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[][] field = new int[2][n]; field new int[2][n] 2 n for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                field[i][j] = sc.nextInt();
            }
        } int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
            for (int j = 0; j < n; j++) {
                field[i][j] = sc.nextInt();
            }
        } {
            for (int j = 0; j < n; j++) {
                field[i][j] = sc.nextInt();
            }
        } for (int j = 0; j < n; j++) {
                field[i][j] = sc.nextInt();
            } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
                field[i][j] = sc.nextInt();
            } {
                field[i][j] = sc.nextInt();
            } field[i][j] = sc.nextInt() field[i][j] field[i] field i j sc.nextInt() sc.nextInt sc int[] array = new int[n]; array new int[n] n for (int i = 0; i < n; i++) {
            array[i] = IntStream.of(Arrays.copyOfRange(field[0], 0, i + 1)).sum();
            array[i] += IntStream.of(Arrays.copyOfRange(field[1], i, n)).sum();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            array[i] = IntStream.of(Arrays.copyOfRange(field[0], 0, i + 1)).sum();
            array[i] += IntStream.of(Arrays.copyOfRange(field[1], i, n)).sum();
        } {
            array[i] = IntStream.of(Arrays.copyOfRange(field[0], 0, i + 1)).sum();
            array[i] += IntStream.of(Arrays.copyOfRange(field[1], i, n)).sum();
        } array[i] = IntStream.of(Arrays.copyOfRange(field[0], 0, i + 1)).sum() array[i] array i IntStream.of(Arrays.copyOfRange(field[0], 0, i + 1)).sum() IntStream.of(Arrays.copyOfRange(field[0], 0, i + 1)).sum IntStream.of(Arrays.copyOfRange(field[0], 0, i + 1)) IntStream.of IntStream Arrays.copyOfRange(field[0], 0, i + 1) Arrays.copyOfRange Arrays field[0] field 0 0 i + 1 i 1 array[i] += IntStream.of(Arrays.copyOfRange(field[1], i, n)).sum() array[i] array i IntStream.of(Arrays.copyOfRange(field[1], i, n)).sum() IntStream.of(Arrays.copyOfRange(field[1], i, n)).sum IntStream.of(Arrays.copyOfRange(field[1], i, n)) IntStream.of IntStream Arrays.copyOfRange(field[1], i, n) Arrays.copyOfRange Arrays field[1] field 1 i n System.out.println(Arrays.stream(array).max().getAsInt()) System.out.println System.out System System.out Arrays.stream(array).max().getAsInt() Arrays.stream(array).max().getAsInt Arrays.stream(array).max() Arrays.stream(array).max Arrays.stream(array) Arrays.stream Arrays array String args[] args public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] field = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                field[i][j] = sc.nextInt();
            }
        }
        int[] array = new int[n];
        for (int i = 0; i < n; i++) {
            array[i] = IntStream.of(Arrays.copyOfRange(field[0], 0, i + 1)).sum();
            array[i] += IntStream.of(Arrays.copyOfRange(field[1], i, n)).sum();
        }
        System.out.println(Arrays.stream(array).max().getAsInt());
    }
} public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] field = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                field[i][j] = sc.nextInt();
            }
        }
        int[] array = new int[n];
        for (int i = 0; i < n; i++) {
            array[i] = IntStream.of(Arrays.copyOfRange(field[0], 0, i + 1)).sum();
            array[i] += IntStream.of(Arrays.copyOfRange(field[1], i, n)).sum();
        }
        System.out.println(Arrays.stream(array).max().getAsInt());
    }
} Main
import java.util.Arrays;
import java.util.Scanner;
import java.util.stream.IntStream;

public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] field = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                field[i][j] = sc.nextInt();
            }
        }
        int[] array = new int[n];
        for (int i = 0; i < n; i++) {
            array[i] = IntStream.of(Arrays.copyOfRange(field[0], 0, i + 1)).sum();
            array[i] += IntStream.of(Arrays.copyOfRange(field[1], i, n)).sum();
        }
        System.out.println(Arrays.stream(array).max().getAsInt());
    }
}