import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc  = new Scanner(System.in);

        int N = sc.nextInt();
        int [][] grid = new int [2][N];
        
        for (int i=0; i<2; i++) {
            for (int j=0; j<N; j++) {
                grid[i][j] = sc.nextInt();
            }
        }

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

        int N = sc.nextInt();
        int [][] grid = new int [2][N];
        
        for (int i=0; i<2; i++) {
            for (int j=0; j<N; j++) {
                grid[i][j] = sc.nextInt();
            }
        }

        int ans = 0;
        
        for (int i=0; i<N; i++) {
            int sum = 0;
            for (int j=0; j<=i; j++) {
                sum += grid[0][j];
            }
            for (int j=i; j<N; j++) {
                sum += grid[1][j];
            }
            ans = Math.max(ans, sum);
        }
        System.out.println(ans);
        
    }
} Main public static void main(String[] args) {
        Scanner sc  = new Scanner(System.in);

        int N = sc.nextInt();
        int [][] grid = new int [2][N];
        
        for (int i=0; i<2; i++) {
            for (int j=0; j<N; j++) {
                grid[i][j] = sc.nextInt();
            }
        }

        int ans = 0;
        
        for (int i=0; i<N; i++) {
            int sum = 0;
            for (int j=0; j<=i; j++) {
                sum += grid[0][j];
            }
            for (int j=i; j<N; j++) {
                sum += grid[1][j];
            }
            ans = Math.max(ans, sum);
        }
        System.out.println(ans);
        
    } main {
        Scanner sc  = new Scanner(System.in);

        int N = sc.nextInt();
        int [][] grid = new int [2][N];
        
        for (int i=0; i<2; i++) {
            for (int j=0; j<N; j++) {
                grid[i][j] = sc.nextInt();
            }
        }

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

class Main {
    public static void main(String[] args) {
        Scanner sc  = new Scanner(System.in);

        int N = sc.nextInt();
        int [][] grid = new int [2][N];
        
        for (int i=0; i<2; i++) {
            for (int j=0; j<N; j++) {
                grid[i][j] = sc.nextInt();
            }
        }

        int ans = 0;
        
        for (int i=0; i<N; i++) {
            int sum = 0;
            for (int j=0; j<=i; j++) {
                sum += grid[0][j];
            }
            for (int j=i; j<N; j++) {
                sum += grid[1][j];
            }
            ans = Math.max(ans, sum);
        }
        System.out.println(ans);
        
    }
}