import java.util.Scanner;

public class Main {
    void run() {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = scan.nextInt();
            }
        }
        int ans = 0;
        for (int i = 0; i < n; i++) {
            int sum = 0;
            for (int j = 0; j < n; j++) {
                if (j <= i)
                    sum += a[0][j];
                if (j >= i)
                    sum += a[1][j];
            }
            ans = Math.max(ans, sum);
        }
        System.out.println(ans);
    }
    public static void main(String[] args) {
        new Main().run();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    void run() {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = scan.nextInt();
            }
        }
        int ans = 0;
        for (int i = 0; i < n; i++) {
            int sum = 0;
            for (int j = 0; j < n; j++) {
                if (j <= i)
                    sum += a[0][j];
                if (j >= i)
                    sum += a[1][j];
            }
            ans = Math.max(ans, sum);
        }
        System.out.println(ans);
    }
    public static void main(String[] args) {
        new Main().run();
    }
} Main void run() {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = scan.nextInt();
            }
        }
        int ans = 0;
        for (int i = 0; i < n; i++) {
            int sum = 0;
            for (int j = 0; j < n; j++) {
                if (j <= i)
                    sum += a[0][j];
                if (j >= i)
                    sum += a[1][j];
            }
            ans = Math.max(ans, sum);
        }
        System.out.println(ans);
    } run {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = scan.nextInt();
            }
        }
        int ans = 0;
        for (int i = 0; i < n; i++) {
            int sum = 0;
            for (int j = 0; j < n; j++) {
                if (j <= i)
                    sum += a[0][j];
                if (j >= i)
                    sum += a[1][j];
            }
            ans = Math.max(ans, sum);
        }
        System.out.println(ans);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan 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] = scan.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] = scan.nextInt();
            }
        } {
            for (int j = 0; j < n; j++) {
                a[i][j] = scan.nextInt();
            }
        } for (int j = 0; j < n; j++) {
                a[i][j] = scan.nextInt();
            } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
                a[i][j] = scan.nextInt();
            } {
                a[i][j] = scan.nextInt();
            } a[i][j] = scan.nextInt() a[i][j] a[i] a i j scan.nextInt() scan.nextInt scan int ans = 0; ans 0 for (int i = 0; i < n; i++) {
            int sum = 0;
            for (int j = 0; j < n; j++) {
                if (j <= i)
                    sum += a[0][j];
                if (j >= i)
                    sum += a[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 < n; j++) {
                if (j <= i)
                    sum += a[0][j];
                if (j >= i)
                    sum += a[1][j];
            }
            ans = Math.max(ans, sum);
        } {
            int sum = 0;
            for (int j = 0; j < n; j++) {
                if (j <= i)
                    sum += a[0][j];
                if (j >= i)
                    sum += a[1][j];
            }
            ans = Math.max(ans, sum);
        } int sum = 0; sum 0 for (int j = 0; j < n; j++) {
                if (j <= i)
                    sum += a[0][j];
                if (j >= i)
                    sum += a[1][j];
            } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
                if (j <= i)
                    sum += a[0][j];
                if (j >= i)
                    sum += a[1][j];
            } {
                if (j <= i)
                    sum += a[0][j];
                if (j >= i)
                    sum += a[1][j];
            } if (j <= i)
                    sum += a[0][j]; j <= i j i sum += a[0][j] sum a[0][j] a[0] a 0 j if (j >= i)
                    sum += a[1][j]; j >= i j i sum += a[1][j] sum a[1][j] a[1] a 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 public static void main(String[] args) {
        new Main().run();
    } main {
        new Main().run();
    } new Main().run() new Main().run new Main() String[] args args public class Main {
    void run() {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = scan.nextInt();
            }
        }
        int ans = 0;
        for (int i = 0; i < n; i++) {
            int sum = 0;
            for (int j = 0; j < n; j++) {
                if (j <= i)
                    sum += a[0][j];
                if (j >= i)
                    sum += a[1][j];
            }
            ans = Math.max(ans, sum);
        }
        System.out.println(ans);
    }
    public static void main(String[] args) {
        new Main().run();
    }
} public class Main {
    void run() {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = scan.nextInt();
            }
        }
        int ans = 0;
        for (int i = 0; i < n; i++) {
            int sum = 0;
            for (int j = 0; j < n; j++) {
                if (j <= i)
                    sum += a[0][j];
                if (j >= i)
                    sum += a[1][j];
            }
            ans = Math.max(ans, sum);
        }
        System.out.println(ans);
    }
    public static void main(String[] args) {
        new Main().run();
    }
} Main
import java.util.Scanner;

public class Main {
    void run() {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = scan.nextInt();
            }
        }
        int ans = 0;
        for (int i = 0; i < n; i++) {
            int sum = 0;
            for (int j = 0; j < n; j++) {
                if (j <= i)
                    sum += a[0][j];
                if (j >= i)
                    sum += a[1][j];
            }
            ans = Math.max(ans, sum);
        }
        System.out.println(ans);
    }
    public static void main(String[] args) {
        new Main().run();
    }
}
