import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        int ans = 0;
        for (int i = 0; i < n; i++) {
            int temp = 0;
            for (int j = 0; j <= i; j++) {
                temp += a[0][j];
            }
            for (int j = i; j < n; j++) {
                temp += a[1][j];
            }
            ans = Math.max(ans, temp);
        }
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        int ans = 0;
        for (int i = 0; i < n; i++) {
            int temp = 0;
            for (int j = 0; j <= i; j++) {
                temp += a[0][j];
            }
            for (int j = i; j < n; j++) {
                temp += a[1][j];
            }
            ans = Math.max(ans, temp);
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        int ans = 0;
        for (int i = 0; i < n; i++) {
            int temp = 0;
            for (int j = 0; j <= i; j++) {
                temp += a[0][j];
            }
            for (int j = i; j < n; j++) {
                temp += a[1][j];
            }
            ans = Math.max(ans, temp);
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        int ans = 0;
        for (int i = 0; i < n; i++) {
            int temp = 0;
            for (int j = 0; j <= i; j++) {
                temp += a[0][j];
            }
            for (int j = i; j < n; j++) {
                temp += a[1][j];
            }
            ans = Math.max(ans, temp);
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next 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] = Integer.parseInt(sc.next());
            }
        } 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] = Integer.parseInt(sc.next());
            }
        } {
            for (int j = 0; j < n; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        } for (int j = 0; j < n; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
                a[i][j] = Integer.parseInt(sc.next());
            } {
                a[i][j] = Integer.parseInt(sc.next());
            } a[i][j] = Integer.parseInt(sc.next()) a[i][j] a[i] a i j 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 temp = 0;
            for (int j = 0; j <= i; j++) {
                temp += a[0][j];
            }
            for (int j = i; j < n; j++) {
                temp += a[1][j];
            }
            ans = Math.max(ans, temp);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int temp = 0;
            for (int j = 0; j <= i; j++) {
                temp += a[0][j];
            }
            for (int j = i; j < n; j++) {
                temp += a[1][j];
            }
            ans = Math.max(ans, temp);
        } {
            int temp = 0;
            for (int j = 0; j <= i; j++) {
                temp += a[0][j];
            }
            for (int j = i; j < n; j++) {
                temp += a[1][j];
            }
            ans = Math.max(ans, temp);
        } int temp = 0; temp 0 for (int j = 0; j <= i; j++) {
                temp += a[0][j];
            } int j = 0; int j = 0; j 0 j <= i j i j++ j++ j {
                temp += a[0][j];
            } {
                temp += a[0][j];
            } temp += a[0][j] temp a[0][j] a[0] a 0 j for (int j = i; j < n; j++) {
                temp += a[1][j];
            } int j = i; int j = i; j i j < n j n j++ j++ j {
                temp += a[1][j];
            } {
                temp += a[1][j];
            } temp += a[1][j] temp a[1][j] a[1] a 1 j ans = Math.max(ans, temp) ans Math.max(ans, temp) Math.max Math ans temp 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 sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        int ans = 0;
        for (int i = 0; i < n; i++) {
            int temp = 0;
            for (int j = 0; j <= i; j++) {
                temp += a[0][j];
            }
            for (int j = i; j < n; j++) {
                temp += a[1][j];
            }
            ans = Math.max(ans, temp);
        }
        System.out.println(ans);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        int ans = 0;
        for (int i = 0; i < n; i++) {
            int temp = 0;
            for (int j = 0; j <= i; j++) {
                temp += a[0][j];
            }
            for (int j = i; j < n; j++) {
                temp += a[1][j];
            }
            ans = Math.max(ans, temp);
        }
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = Integer.parseInt(sc.next());
            }
        }
        int ans = 0;
        for (int i = 0; i < n; i++) {
            int temp = 0;
            for (int j = 0; j <= i; j++) {
                temp += a[0][j];
            }
            for (int j = i; j < n; j++) {
                temp += a[1][j];
            }
            ans = Math.max(ans, temp);
        }
        System.out.println(ans);
    }
}