import java.lang.Math;
import java.util.Arrays;
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int board[][] = new int[2][N];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                board[i][j] = sc.nextInt();
            }
        }

        // 上は左側からの累積和, 下は右側からの累積和を取っておく
        int sumUp[] = new int[N];
        sumUp[0] = board[0][0];
        for (int i = 1; i < N; i++) {
            sumUp[i] = sumUp[i-1] + board[0][i];
        }
        int sumDown[] = new int[N];
        sumDown[N-1] = board[1][N-1];
        for (int i = N-2; i >= 0; i--) {
            sumDown[i] = sumDown[i+1] + board[1][i];
        }

        int answer = 0;
        for (int i = 0; i < N; i++) {
            answer = Math.max(answer, (sumUp[i] + sumDown[i]));
        }

        System.out.println(answer);
    }
} import java.lang.Math; Math java.lang import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int board[][] = new int[2][N];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                board[i][j] = sc.nextInt();
            }
        }

        // 上は左側からの累積和, 下は右側からの累積和を取っておく
        int sumUp[] = new int[N];
        sumUp[0] = board[0][0];
        for (int i = 1; i < N; i++) {
            sumUp[i] = sumUp[i-1] + board[0][i];
        }
        int sumDown[] = new int[N];
        sumDown[N-1] = board[1][N-1];
        for (int i = N-2; i >= 0; i--) {
            sumDown[i] = sumDown[i+1] + board[1][i];
        }

        int answer = 0;
        for (int i = 0; i < N; i++) {
            answer = Math.max(answer, (sumUp[i] + sumDown[i]));
        }

        System.out.println(answer);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int board[][] = new int[2][N];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                board[i][j] = sc.nextInt();
            }
        }

        // 上は左側からの累積和, 下は右側からの累積和を取っておく
        int sumUp[] = new int[N];
        sumUp[0] = board[0][0];
        for (int i = 1; i < N; i++) {
            sumUp[i] = sumUp[i-1] + board[0][i];
        }
        int sumDown[] = new int[N];
        sumDown[N-1] = board[1][N-1];
        for (int i = N-2; i >= 0; i--) {
            sumDown[i] = sumDown[i+1] + board[1][i];
        }

        int answer = 0;
        for (int i = 0; i < N; i++) {
            answer = Math.max(answer, (sumUp[i] + sumDown[i]));
        }

        System.out.println(answer);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int board[][] = new int[2][N];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                board[i][j] = sc.nextInt();
            }
        }

        // 上は左側からの累積和, 下は右側からの累積和を取っておく
        int sumUp[] = new int[N];
        sumUp[0] = board[0][0];
        for (int i = 1; i < N; i++) {
            sumUp[i] = sumUp[i-1] + board[0][i];
        }
        int sumDown[] = new int[N];
        sumDown[N-1] = board[1][N-1];
        for (int i = N-2; i >= 0; i--) {
            sumDown[i] = sumDown[i+1] + board[1][i];
        }

        int answer = 0;
        for (int i = 0; i < N; i++) {
            answer = Math.max(answer, (sumUp[i] + sumDown[i]));
        }

        System.out.println(answer);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int board[][] = new int[2][N]; board new int[2][N] 2 N for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                board[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++) {
                board[i][j] = sc.nextInt();
            }
        } {
            for (int j = 0; j < N; j++) {
                board[i][j] = sc.nextInt();
            }
        } for (int j = 0; j < N; j++) {
                board[i][j] = sc.nextInt();
            } int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
                board[i][j] = sc.nextInt();
            } {
                board[i][j] = sc.nextInt();
            } board[i][j] = sc.nextInt() board[i][j] board[i] board i j sc.nextInt() sc.nextInt sc int sumUp[] = new int[N]; sumUp new int[N] N sumUp[0] = board[0][0] sumUp[0] sumUp 0 board[0][0] board[0] board 0 0 for (int i = 1; i < N; i++) {
            sumUp[i] = sumUp[i-1] + board[0][i];
        } int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
            sumUp[i] = sumUp[i-1] + board[0][i];
        } {
            sumUp[i] = sumUp[i-1] + board[0][i];
        } sumUp[i] = sumUp[i-1] + board[0][i] sumUp[i] sumUp i sumUp[i-1] + board[0][i] sumUp[i-1] sumUp i-1 i 1 board[0][i] board[0] board 0 i int sumDown[] = new int[N]; sumDown new int[N] N sumDown[N-1] = board[1][N-1] sumDown[N-1] sumDown N-1 N 1 board[1][N-1] board[1] board 1 N-1 N 1 for (int i = N-2; i >= 0; i--) {
            sumDown[i] = sumDown[i+1] + board[1][i];
        } int i = N-2; int i = N-2; i N-2 N 2 i >= 0 i 0 i-- i-- i {
            sumDown[i] = sumDown[i+1] + board[1][i];
        } {
            sumDown[i] = sumDown[i+1] + board[1][i];
        } sumDown[i] = sumDown[i+1] + board[1][i] sumDown[i] sumDown i sumDown[i+1] + board[1][i] sumDown[i+1] sumDown i+1 i 1 board[1][i] board[1] board 1 i int answer = 0; answer 0 for (int i = 0; i < N; i++) {
            answer = Math.max(answer, (sumUp[i] + sumDown[i]));
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            answer = Math.max(answer, (sumUp[i] + sumDown[i]));
        } {
            answer = Math.max(answer, (sumUp[i] + sumDown[i]));
        } answer = Math.max(answer, (sumUp[i] + sumDown[i])) answer Math.max(answer, (sumUp[i] + sumDown[i])) Math.max Math answer (sumUp[i] + sumDown[i]) sumUp[i] sumUp i sumDown[i] sumDown i System.out.println(answer) System.out.println System.out System System.out answer String[] args args
import java.lang.Math;
import java.util.Arrays;
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int board[][] = new int[2][N];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                board[i][j] = sc.nextInt();
            }
        }

        // 上は左側からの累積和, 下は右側からの累積和を取っておく
        int sumUp[] = new int[N];
        sumUp[0] = board[0][0];
        for (int i = 1; i < N; i++) {
            sumUp[i] = sumUp[i-1] + board[0][i];
        }
        int sumDown[] = new int[N];
        sumDown[N-1] = board[1][N-1];
        for (int i = N-2; i >= 0; i--) {
            sumDown[i] = sumDown[i+1] + board[1][i];
        }

        int answer = 0;
        for (int i = 0; i < N; i++) {
            answer = Math.max(answer, (sumUp[i] + sumDown[i]));
        }

        System.out.println(answer);
    }
}
