import java.util.Scanner;

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

        int max_score = 0;
        int i_sum = 0;
        // i番目で曲がった
        for (int i = 0; i < N; i++) {
            i_sum += A[0][i];
            int score = i_sum;
            for (int j = i; j < N; j++) {
                score += A[1][j];
            }
            if (score > max_score) max_score = score;
        }
        System.out.println(max_score);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int A[][] = new int[2][N];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                A[i][j] = sc.nextInt();
            }
        }

        int max_score = 0;
        int i_sum = 0;
        // i番目で曲がった
        for (int i = 0; i < N; i++) {
            i_sum += A[0][i];
            int score = i_sum;
            for (int j = i; j < N; j++) {
                score += A[1][j];
            }
            if (score > max_score) max_score = score;
        }
        System.out.println(max_score);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int A[][] = new int[2][N];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                A[i][j] = sc.nextInt();
            }
        }

        int max_score = 0;
        int i_sum = 0;
        // i番目で曲がった
        for (int i = 0; i < N; i++) {
            i_sum += A[0][i];
            int score = i_sum;
            for (int j = i; j < N; j++) {
                score += A[1][j];
            }
            if (score > max_score) max_score = score;
        }
        System.out.println(max_score);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int A[][] = new int[2][N];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                A[i][j] = sc.nextInt();
            }
        }

        int max_score = 0;
        int i_sum = 0;
        // i番目で曲がった
        for (int i = 0; i < N; i++) {
            i_sum += A[0][i];
            int score = i_sum;
            for (int j = i; j < N; j++) {
                score += A[1][j];
            }
            if (score > max_score) max_score = score;
        }
        System.out.println(max_score);
    } 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 i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                A[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++) {
                A[i][j] = sc.nextInt();
            }
        } {
            for (int j = 0; j < N; j++) {
                A[i][j] = sc.nextInt();
            }
        } for (int j = 0; j < N; j++) {
                A[i][j] = sc.nextInt();
            } int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
                A[i][j] = sc.nextInt();
            } {
                A[i][j] = sc.nextInt();
            } A[i][j] = sc.nextInt() A[i][j] A[i] A i j sc.nextInt() sc.nextInt sc int max_score = 0; max_score 0 int i_sum = 0; i_sum 0 for (int i = 0; i < N; i++) {
            i_sum += A[0][i];
            int score = i_sum;
            for (int j = i; j < N; j++) {
                score += A[1][j];
            }
            if (score > max_score) max_score = score;
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            i_sum += A[0][i];
            int score = i_sum;
            for (int j = i; j < N; j++) {
                score += A[1][j];
            }
            if (score > max_score) max_score = score;
        } {
            i_sum += A[0][i];
            int score = i_sum;
            for (int j = i; j < N; j++) {
                score += A[1][j];
            }
            if (score > max_score) max_score = score;
        } i_sum += A[0][i] i_sum A[0][i] A[0] A 0 i int score = i_sum; score i_sum for (int j = i; j < N; j++) {
                score += A[1][j];
            } int j = i; int j = i; j i j < N j N j++ j++ j {
                score += A[1][j];
            } {
                score += A[1][j];
            } score += A[1][j] score A[1][j] A[1] A 1 j if (score > max_score) max_score = score; score > max_score score max_score max_score = score max_score score System.out.println(max_score) System.out.println System.out System System.out max_score String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int A[][] = new int[2][N];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                A[i][j] = sc.nextInt();
            }
        }

        int max_score = 0;
        int i_sum = 0;
        // i番目で曲がった
        for (int i = 0; i < N; i++) {
            i_sum += A[0][i];
            int score = i_sum;
            for (int j = i; j < N; j++) {
                score += A[1][j];
            }
            if (score > max_score) max_score = score;
        }
        System.out.println(max_score);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int A[][] = new int[2][N];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                A[i][j] = sc.nextInt();
            }
        }

        int max_score = 0;
        int i_sum = 0;
        // i番目で曲がった
        for (int i = 0; i < N; i++) {
            i_sum += A[0][i];
            int score = i_sum;
            for (int j = i; j < N; j++) {
                score += A[1][j];
            }
            if (score > max_score) max_score = score;
        }
        System.out.println(max_score);
    }
} Main
import java.util.Scanner;

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

        int max_score = 0;
        int i_sum = 0;
        // i番目で曲がった
        for (int i = 0; i < N; i++) {
            i_sum += A[0][i];
            int score = i_sum;
            for (int j = i; j < N; j++) {
                score += A[1][j];
            }
            if (score > max_score) max_score = score;
        }
        System.out.println(max_score);
    }
}