import java.util.*;

class Main {
    public static void main(String[] args) {
        new Solver().run();
    }
}

class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[][] A = new int[2][N];

        for (int k = 0; k < 2; k++) {
            for (int i = 0; i < N; i++) {
                A[k][i] = sc.nextInt();
            }
        }

        int sum = A[0][0];
        for (int i = 0; i < N; i++) {
            sum += A[1][i];
        }

        int max = sum;
        for (int i = 1; i < N; i++) {
            sum -= A[1][i - 1];
            sum += A[0][i];
            max = Math.max(max, sum);
        }

        System.out.println(max);
        return;
    }

} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        new Solver().run();
    }
} Main public static void main(String[] args) {
        new Solver().run();
    } main {
        new Solver().run();
    } new Solver().run() new Solver().run new Solver() String[] args args class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[][] A = new int[2][N];

        for (int k = 0; k < 2; k++) {
            for (int i = 0; i < N; i++) {
                A[k][i] = sc.nextInt();
            }
        }

        int sum = A[0][0];
        for (int i = 0; i < N; i++) {
            sum += A[1][i];
        }

        int max = sum;
        for (int i = 1; i < N; i++) {
            sum -= A[1][i - 1];
            sum += A[0][i];
            max = Math.max(max, sum);
        }

        System.out.println(max);
        return;
    }

} Solver public void run() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[][] A = new int[2][N];

        for (int k = 0; k < 2; k++) {
            for (int i = 0; i < N; i++) {
                A[k][i] = sc.nextInt();
            }
        }

        int sum = A[0][0];
        for (int i = 0; i < N; i++) {
            sum += A[1][i];
        }

        int max = sum;
        for (int i = 1; i < N; i++) {
            sum -= A[1][i - 1];
            sum += A[0][i];
            max = Math.max(max, sum);
        }

        System.out.println(max);
        return;
    } run {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[][] A = new int[2][N];

        for (int k = 0; k < 2; k++) {
            for (int i = 0; i < N; i++) {
                A[k][i] = sc.nextInt();
            }
        }

        int sum = A[0][0];
        for (int i = 0; i < N; i++) {
            sum += A[1][i];
        }

        int max = sum;
        for (int i = 1; i < N; i++) {
            sum -= A[1][i - 1];
            sum += A[0][i];
            max = Math.max(max, sum);
        }

        System.out.println(max);
        return;
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[][] A = new int[2][N]; A new int[2][N] 2 N for (int k = 0; k < 2; k++) {
            for (int i = 0; i < N; i++) {
                A[k][i] = sc.nextInt();
            }
        } int k = 0; int k = 0; k 0 k < 2 k 2 k++ k++ k {
            for (int i = 0; i < N; i++) {
                A[k][i] = sc.nextInt();
            }
        } {
            for (int i = 0; i < N; i++) {
                A[k][i] = sc.nextInt();
            }
        } for (int i = 0; i < N; i++) {
                A[k][i] = sc.nextInt();
            } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                A[k][i] = sc.nextInt();
            } {
                A[k][i] = sc.nextInt();
            } A[k][i] = sc.nextInt() A[k][i] A[k] A k i sc.nextInt() sc.nextInt sc int sum = A[0][0]; sum A[0][0] A[0] A 0 0 for (int i = 0; i < N; i++) {
            sum += A[1][i];
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            sum += A[1][i];
        } {
            sum += A[1][i];
        } sum += A[1][i] sum A[1][i] A[1] A 1 i int max = sum; max sum for (int i = 1; i < N; i++) {
            sum -= A[1][i - 1];
            sum += A[0][i];
            max = Math.max(max, sum);
        } int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
            sum -= A[1][i - 1];
            sum += A[0][i];
            max = Math.max(max, sum);
        } {
            sum -= A[1][i - 1];
            sum += A[0][i];
            max = Math.max(max, sum);
        } sum -= A[1][i - 1] sum A[1][i - 1] A[1] A 1 i - 1 i 1 sum += A[0][i] sum A[0][i] A[0] A 0 i max = Math.max(max, sum) max Math.max(max, sum) Math.max Math max sum System.out.println(max) System.out.println System.out System System.out max return;
import java.util.*;

class Main {
    public static void main(String[] args) {
        new Solver().run();
    }
}

class Solver {

    public void run() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[][] A = new int[2][N];

        for (int k = 0; k < 2; k++) {
            for (int i = 0; i < N; i++) {
                A[k][i] = sc.nextInt();
            }
        }

        int sum = A[0][0];
        for (int i = 0; i < N; i++) {
            sum += A[1][i];
        }

        int max = sum;
        for (int i = 1; i < N; i++) {
            sum -= A[1][i - 1];
            sum += A[0][i];
            max = Math.max(max, sum);
        }

        System.out.println(max);
        return;
    }

}