import java.util.*;
public class Main {
    
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int[][] A = new int[2][N];
        for (int i = 0; i < N; i++) {
            A[0][i] = scanner.nextInt();
        }
        for (int i = 0; i < N; i++) {
            A[1][i] = scanner.nextInt();
        }
        int ans = 0;
        for (int i = 0; i < N; i++) {
            int score = 0;
            for (int j = 0; j < N; j++) {
                if(j<i) score += A[0][j];
                else if(i==j) score += A[0][j] + A[1][j];
                else if(i<j) score += A[1][j];
            }
            ans = Math.max(ans,score);
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main {
    
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int[][] A = new int[2][N];
        for (int i = 0; i < N; i++) {
            A[0][i] = scanner.nextInt();
        }
        for (int i = 0; i < N; i++) {
            A[1][i] = scanner.nextInt();
        }
        int ans = 0;
        for (int i = 0; i < N; i++) {
            int score = 0;
            for (int j = 0; j < N; j++) {
                if(j<i) score += A[0][j];
                else if(i==j) score += A[0][j] + A[1][j];
                else if(i<j) score += A[1][j];
            }
            ans = Math.max(ans,score);
        }
        System.out.println(ans);
    }
} Main public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int[][] A = new int[2][N];
        for (int i = 0; i < N; i++) {
            A[0][i] = scanner.nextInt();
        }
        for (int i = 0; i < N; i++) {
            A[1][i] = scanner.nextInt();
        }
        int ans = 0;
        for (int i = 0; i < N; i++) {
            int score = 0;
            for (int j = 0; j < N; j++) {
                if(j<i) score += A[0][j];
                else if(i==j) score += A[0][j] + A[1][j];
                else if(i<j) score += A[1][j];
            }
            ans = Math.max(ans,score);
        }
        System.out.println(ans);
    } main {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int[][] A = new int[2][N];
        for (int i = 0; i < N; i++) {
            A[0][i] = scanner.nextInt();
        }
        for (int i = 0; i < N; i++) {
            A[1][i] = scanner.nextInt();
        }
        int ans = 0;
        for (int i = 0; i < N; i++) {
            int score = 0;
            for (int j = 0; j < N; j++) {
                if(j<i) score += A[0][j];
                else if(i==j) score += A[0][j] + A[1][j];
                else if(i<j) score += A[1][j];
            }
            ans = Math.max(ans,score);
        }
        System.out.println(ans);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int[][] A = new int[2][N]; A new int[2][N] 2 N for (int i = 0; i < N; i++) {
            A[0][i] = scanner.nextInt();
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            A[0][i] = scanner.nextInt();
        } {
            A[0][i] = scanner.nextInt();
        } A[0][i] = scanner.nextInt() A[0][i] A[0] A 0 i scanner.nextInt() scanner.nextInt scanner for (int i = 0; i < N; i++) {
            A[1][i] = scanner.nextInt();
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            A[1][i] = scanner.nextInt();
        } {
            A[1][i] = scanner.nextInt();
        } A[1][i] = scanner.nextInt() A[1][i] A[1] A 1 i scanner.nextInt() scanner.nextInt scanner int ans = 0; ans 0 for (int i = 0; i < N; i++) {
            int score = 0;
            for (int j = 0; j < N; j++) {
                if(j<i) score += A[0][j];
                else if(i==j) score += A[0][j] + A[1][j];
                else if(i<j) score += A[1][j];
            }
            ans = Math.max(ans,score);
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            int score = 0;
            for (int j = 0; j < N; j++) {
                if(j<i) score += A[0][j];
                else if(i==j) score += A[0][j] + A[1][j];
                else if(i<j) score += A[1][j];
            }
            ans = Math.max(ans,score);
        } {
            int score = 0;
            for (int j = 0; j < N; j++) {
                if(j<i) score += A[0][j];
                else if(i==j) score += A[0][j] + A[1][j];
                else if(i<j) score += A[1][j];
            }
            ans = Math.max(ans,score);
        } int score = 0; score 0 for (int j = 0; j < N; j++) {
                if(j<i) score += A[0][j];
                else if(i==j) score += A[0][j] + A[1][j];
                else if(i<j) score += A[1][j];
            } int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
                if(j<i) score += A[0][j];
                else if(i==j) score += A[0][j] + A[1][j];
                else if(i<j) score += A[1][j];
            } {
                if(j<i) score += A[0][j];
                else if(i==j) score += A[0][j] + A[1][j];
                else if(i<j) score += A[1][j];
            } if(j<i) score += A[0][j];
                else if(i==j) score += A[0][j] + A[1][j];
                else if(i<j) score += A[1][j]; j<i j i score += A[0][j] score A[0][j] A[0] A 0 j if(i==j) score += A[0][j] + A[1][j];
                else if(i<j) score += A[1][j]; i==j i j score += A[0][j] + A[1][j] score A[0][j] + A[1][j] A[0][j] A[0] A 0 j A[1][j] A[1] A 1 j if(i<j) score += A[1][j]; i<j i j score += A[1][j] score A[1][j] A[1] A 1 j ans = Math.max(ans,score) ans Math.max(ans,score) Math.max Math ans score System.out.println(ans) System.out.println System.out System System.out ans String args[] args public class Main {
    
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int[][] A = new int[2][N];
        for (int i = 0; i < N; i++) {
            A[0][i] = scanner.nextInt();
        }
        for (int i = 0; i < N; i++) {
            A[1][i] = scanner.nextInt();
        }
        int ans = 0;
        for (int i = 0; i < N; i++) {
            int score = 0;
            for (int j = 0; j < N; j++) {
                if(j<i) score += A[0][j];
                else if(i==j) score += A[0][j] + A[1][j];
                else if(i<j) score += A[1][j];
            }
            ans = Math.max(ans,score);
        }
        System.out.println(ans);
    }
} public class Main {
    
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int[][] A = new int[2][N];
        for (int i = 0; i < N; i++) {
            A[0][i] = scanner.nextInt();
        }
        for (int i = 0; i < N; i++) {
            A[1][i] = scanner.nextInt();
        }
        int ans = 0;
        for (int i = 0; i < N; i++) {
            int score = 0;
            for (int j = 0; j < N; j++) {
                if(j<i) score += A[0][j];
                else if(i==j) score += A[0][j] + A[1][j];
                else if(i<j) score += A[1][j];
            }
            ans = Math.max(ans,score);
        }
        System.out.println(ans);
    }
} Main
import java.util.*;
public class Main {
    
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int[][] A = new int[2][N];
        for (int i = 0; i < N; i++) {
            A[0][i] = scanner.nextInt();
        }
        for (int i = 0; i < N; i++) {
            A[1][i] = scanner.nextInt();
        }
        int ans = 0;
        for (int i = 0; i < N; i++) {
            int score = 0;
            for (int j = 0; j < N; j++) {
                if(j<i) score += A[0][j];
                else if(i==j) score += A[0][j] + A[1][j];
                else if(i<j) score += A[1][j];
            }
            ans = Math.max(ans,score);
        }
        System.out.println(ans);
    }
}