import java.util.Scanner;

public class Main {

    static int N;

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

        N = Integer.parseInt(sc.nextLine());
        int[][] grid = new int[2][N];
        for (int i = 0; i < N; i++) {
            grid[0][i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < N; i++) {
            grid[1][i] = Integer.parseInt(sc.next());
        }

        int ans = 0;
        for (int i = 0; i < N; i++) {
            int tmp = 0;
            for (int j = 0; j <= i; j++) {
                // 右移動
                tmp += grid[0][j];
            }
            for (int j = i; j < N; j++) {
                // 下に移動して、あとは全部右移動
                tmp += grid[1][j];
            }

            ans = Math.max(tmp, ans);
        }

        System.out.println(ans);
    }
}
 import java.util.Scanner; Scanner java.util public class Main {

    static int N;

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

        N = Integer.parseInt(sc.nextLine());
        int[][] grid = new int[2][N];
        for (int i = 0; i < N; i++) {
            grid[0][i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < N; i++) {
            grid[1][i] = Integer.parseInt(sc.next());
        }

        int ans = 0;
        for (int i = 0; i < N; i++) {
            int tmp = 0;
            for (int j = 0; j <= i; j++) {
                // 右移動
                tmp += grid[0][j];
            }
            for (int j = i; j < N; j++) {
                // 下に移動して、あとは全部右移動
                tmp += grid[1][j];
            }

            ans = Math.max(tmp, ans);
        }

        System.out.println(ans);
    }
} Main static int N; N public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        N = Integer.parseInt(sc.nextLine());
        int[][] grid = new int[2][N];
        for (int i = 0; i < N; i++) {
            grid[0][i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < N; i++) {
            grid[1][i] = Integer.parseInt(sc.next());
        }

        int ans = 0;
        for (int i = 0; i < N; i++) {
            int tmp = 0;
            for (int j = 0; j <= i; j++) {
                // 右移動
                tmp += grid[0][j];
            }
            for (int j = i; j < N; j++) {
                // 下に移動して、あとは全部右移動
                tmp += grid[1][j];
            }

            ans = Math.max(tmp, ans);
        }

        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);

        N = Integer.parseInt(sc.nextLine());
        int[][] grid = new int[2][N];
        for (int i = 0; i < N; i++) {
            grid[0][i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < N; i++) {
            grid[1][i] = Integer.parseInt(sc.next());
        }

        int ans = 0;
        for (int i = 0; i < N; i++) {
            int tmp = 0;
            for (int j = 0; j <= i; j++) {
                // 右移動
                tmp += grid[0][j];
            }
            for (int j = i; j < N; j++) {
                // 下に移動して、あとは全部右移動
                tmp += grid[1][j];
            }

            ans = Math.max(tmp, ans);
        }

        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) N = Integer.parseInt(sc.nextLine()) N Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int[][] grid = new int[2][N]; grid new int[2][N] 2 N for (int i = 0; i < N; i++) {
            grid[0][i] = Integer.parseInt(sc.next());
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            grid[0][i] = Integer.parseInt(sc.next());
        } {
            grid[0][i] = Integer.parseInt(sc.next());
        } grid[0][i] = Integer.parseInt(sc.next()) grid[0][i] grid[0] grid 0 i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc for (int i = 0; i < N; i++) {
            grid[1][i] = Integer.parseInt(sc.next());
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            grid[1][i] = Integer.parseInt(sc.next());
        } {
            grid[1][i] = Integer.parseInt(sc.next());
        } grid[1][i] = Integer.parseInt(sc.next()) grid[1][i] grid[1] grid 1 i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int ans = 0; ans 0 for (int i = 0; i < N; i++) {
            int tmp = 0;
            for (int j = 0; j <= i; j++) {
                // 右移動
                tmp += grid[0][j];
            }
            for (int j = i; j < N; j++) {
                // 下に移動して、あとは全部右移動
                tmp += grid[1][j];
            }

            ans = Math.max(tmp, ans);
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            int tmp = 0;
            for (int j = 0; j <= i; j++) {
                // 右移動
                tmp += grid[0][j];
            }
            for (int j = i; j < N; j++) {
                // 下に移動して、あとは全部右移動
                tmp += grid[1][j];
            }

            ans = Math.max(tmp, ans);
        } {
            int tmp = 0;
            for (int j = 0; j <= i; j++) {
                // 右移動
                tmp += grid[0][j];
            }
            for (int j = i; j < N; j++) {
                // 下に移動して、あとは全部右移動
                tmp += grid[1][j];
            }

            ans = Math.max(tmp, ans);
        } int tmp = 0; tmp 0 for (int j = 0; j <= i; j++) {
                // 右移動
                tmp += grid[0][j];
            } int j = 0; int j = 0; j 0 j <= i j i j++ j++ j {
                // 右移動
                tmp += grid[0][j];
            } {
                // 右移動
                tmp += grid[0][j];
            } tmp += grid[0][j] tmp grid[0][j] grid[0] grid 0 j for (int j = i; j < N; j++) {
                // 下に移動して、あとは全部右移動
                tmp += grid[1][j];
            } int j = i; int j = i; j i j < N j N j++ j++ j {
                // 下に移動して、あとは全部右移動
                tmp += grid[1][j];
            } {
                // 下に移動して、あとは全部右移動
                tmp += grid[1][j];
            } tmp += grid[1][j] tmp grid[1][j] grid[1] grid 1 j ans = Math.max(tmp, ans) ans Math.max(tmp, ans) Math.max Math tmp ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

    static int N;

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

        N = Integer.parseInt(sc.nextLine());
        int[][] grid = new int[2][N];
        for (int i = 0; i < N; i++) {
            grid[0][i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < N; i++) {
            grid[1][i] = Integer.parseInt(sc.next());
        }

        int ans = 0;
        for (int i = 0; i < N; i++) {
            int tmp = 0;
            for (int j = 0; j <= i; j++) {
                // 右移動
                tmp += grid[0][j];
            }
            for (int j = i; j < N; j++) {
                // 下に移動して、あとは全部右移動
                tmp += grid[1][j];
            }

            ans = Math.max(tmp, ans);
        }

        System.out.println(ans);
    }
} public class Main {

    static int N;

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

        N = Integer.parseInt(sc.nextLine());
        int[][] grid = new int[2][N];
        for (int i = 0; i < N; i++) {
            grid[0][i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < N; i++) {
            grid[1][i] = Integer.parseInt(sc.next());
        }

        int ans = 0;
        for (int i = 0; i < N; i++) {
            int tmp = 0;
            for (int j = 0; j <= i; j++) {
                // 右移動
                tmp += grid[0][j];
            }
            for (int j = i; j < N; j++) {
                // 下に移動して、あとは全部右移動
                tmp += grid[1][j];
            }

            ans = Math.max(tmp, ans);
        }

        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {

    static int N;

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

        N = Integer.parseInt(sc.nextLine());
        int[][] grid = new int[2][N];
        for (int i = 0; i < N; i++) {
            grid[0][i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < N; i++) {
            grid[1][i] = Integer.parseInt(sc.next());
        }

        int ans = 0;
        for (int i = 0; i < N; i++) {
            int tmp = 0;
            for (int j = 0; j <= i; j++) {
                // 右移動
                tmp += grid[0][j];
            }
            for (int j = i; j < N; j++) {
                // 下に移動して、あとは全部右移動
                tmp += grid[1][j];
            }

            ans = Math.max(tmp, ans);
        }

        System.out.println(ans);
    }
}

