import java.util.Scanner;

class Main {

    static int n = 5;
    static int max;
    static int g[][];

    public static void go(int x, int y, int cur) {
        cur += g[x][y];
        if (x == 0) {
            go(x + 1, y, cur);
        }
        if (y < n - 1)
            go(x, y + 1, cur);
        max = Math.max(max, cur);
    }

    public static void main(String... args) {
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        g = new int[2][n];
        for (int i = 0, col = 0; i < n; i++) {
            g[col][i] = in.nextInt();
        }
        for (int i = 0, col = 1; i < n; i++) {
            g[col][i] = in.nextInt();
        }
        go(0, 0, 0);
        System.out.println(max);

    }

}
 import java.util.Scanner; Scanner java.util class Main {

    static int n = 5;
    static int max;
    static int g[][];

    public static void go(int x, int y, int cur) {
        cur += g[x][y];
        if (x == 0) {
            go(x + 1, y, cur);
        }
        if (y < n - 1)
            go(x, y + 1, cur);
        max = Math.max(max, cur);
    }

    public static void main(String... args) {
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        g = new int[2][n];
        for (int i = 0, col = 0; i < n; i++) {
            g[col][i] = in.nextInt();
        }
        for (int i = 0, col = 1; i < n; i++) {
            g[col][i] = in.nextInt();
        }
        go(0, 0, 0);
        System.out.println(max);

    }

} Main static int n = 5; n 5 static int max; max static int g[][]; g public static void go(int x, int y, int cur) {
        cur += g[x][y];
        if (x == 0) {
            go(x + 1, y, cur);
        }
        if (y < n - 1)
            go(x, y + 1, cur);
        max = Math.max(max, cur);
    } go {
        cur += g[x][y];
        if (x == 0) {
            go(x + 1, y, cur);
        }
        if (y < n - 1)
            go(x, y + 1, cur);
        max = Math.max(max, cur);
    } cur += g[x][y] cur g[x][y] g[x] g x y if (x == 0) {
            go(x + 1, y, cur);
        } x == 0 x 0 {
            go(x + 1, y, cur);
        } go(x + 1, y, cur) go x + 1 x 1 y cur if (y < n - 1)
            go(x, y + 1, cur); y < n - 1 y n - 1 n 1 go(x, y + 1, cur) go x y + 1 y 1 cur max = Math.max(max, cur) max Math.max(max, cur) Math.max Math max cur int x x int y y int cur cur public static void main(String... args) {
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        g = new int[2][n];
        for (int i = 0, col = 0; i < n; i++) {
            g[col][i] = in.nextInt();
        }
        for (int i = 0, col = 1; i < n; i++) {
            g[col][i] = in.nextInt();
        }
        go(0, 0, 0);
        System.out.println(max);

    } main {
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        g = new int[2][n];
        for (int i = 0, col = 0; i < n; i++) {
            g[col][i] = in.nextInt();
        }
        for (int i = 0, col = 1; i < n; i++) {
            g[col][i] = in.nextInt();
        }
        go(0, 0, 0);
        System.out.println(max);

    } Scanner in = new Scanner(System.in); in new Scanner(System.in) n = in.nextInt() n in.nextInt() in.nextInt in g = new int[2][n] g new int[2][n] 2 n for (int i = 0, col = 0; i < n; i++) {
            g[col][i] = in.nextInt();
        } int i = 0, col = 0; int i = 0 i 0 col = 0; col 0 i < n i n i++ i++ i {
            g[col][i] = in.nextInt();
        } {
            g[col][i] = in.nextInt();
        } g[col][i] = in.nextInt() g[col][i] g[col] g col i in.nextInt() in.nextInt in for (int i = 0, col = 1; i < n; i++) {
            g[col][i] = in.nextInt();
        } int i = 0, col = 1; int i = 0 i 0 col = 1; col 1 i < n i n i++ i++ i {
            g[col][i] = in.nextInt();
        } {
            g[col][i] = in.nextInt();
        } g[col][i] = in.nextInt() g[col][i] g[col] g col i in.nextInt() in.nextInt in go(0, 0, 0) go 0 0 0 System.out.println(max) System.out.println System.out System System.out max String... args args
import java.util.Scanner;

class Main {

    static int n = 5;
    static int max;
    static int g[][];

    public static void go(int x, int y, int cur) {
        cur += g[x][y];
        if (x == 0) {
            go(x + 1, y, cur);
        }
        if (y < n - 1)
            go(x, y + 1, cur);
        max = Math.max(max, cur);
    }

    public static void main(String... args) {
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        g = new int[2][n];
        for (int i = 0, col = 0; i < n; i++) {
            g[col][i] = in.nextInt();
        }
        for (int i = 0, col = 1; i < n; i++) {
            g[col][i] = in.nextInt();
        }
        go(0, 0, 0);
        System.out.println(max);

    }

}

