import java.util.Scanner;

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

        final int N = Integer.parseInt(scanner.next());
        scanner.nextLine();// To get rid of new line
        final String A1 = scanner.nextLine();
        final String A2 = scanner.nextLine();

        String[] A1Array = A1.split(" ");
        String[] A2Array = A2.split(" ");

        int[][] AIJ = new int[2][N];

        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                if (i == 0) {
                    AIJ[0][j] = Integer.parseInt(A1Array[j]);
                } else {
                    AIJ[1][j] = Integer.parseInt(A2Array[j]);
                }
            }
        }

        int result = 0;

        for (int i = 0; i < N; i++) {
            int I = 0;
            int sum = 0;
            for (int j = 0; j < N; j++) {
                if (j == i) {
                    sum += AIJ[0][j];
                    I = 1;
                }
                sum += AIJ[I][j];

            }
            if (result < sum) {
                result = sum;
            }
        }
        System.out.println(result);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        final int N = Integer.parseInt(scanner.next());
        scanner.nextLine();// To get rid of new line
        final String A1 = scanner.nextLine();
        final String A2 = scanner.nextLine();

        String[] A1Array = A1.split(" ");
        String[] A2Array = A2.split(" ");

        int[][] AIJ = new int[2][N];

        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                if (i == 0) {
                    AIJ[0][j] = Integer.parseInt(A1Array[j]);
                } else {
                    AIJ[1][j] = Integer.parseInt(A2Array[j]);
                }
            }
        }

        int result = 0;

        for (int i = 0; i < N; i++) {
            int I = 0;
            int sum = 0;
            for (int j = 0; j < N; j++) {
                if (j == i) {
                    sum += AIJ[0][j];
                    I = 1;
                }
                sum += AIJ[I][j];

            }
            if (result < sum) {
                result = sum;
            }
        }
        System.out.println(result);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        final int N = Integer.parseInt(scanner.next());
        scanner.nextLine();// To get rid of new line
        final String A1 = scanner.nextLine();
        final String A2 = scanner.nextLine();

        String[] A1Array = A1.split(" ");
        String[] A2Array = A2.split(" ");

        int[][] AIJ = new int[2][N];

        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                if (i == 0) {
                    AIJ[0][j] = Integer.parseInt(A1Array[j]);
                } else {
                    AIJ[1][j] = Integer.parseInt(A2Array[j]);
                }
            }
        }

        int result = 0;

        for (int i = 0; i < N; i++) {
            int I = 0;
            int sum = 0;
            for (int j = 0; j < N; j++) {
                if (j == i) {
                    sum += AIJ[0][j];
                    I = 1;
                }
                sum += AIJ[I][j];

            }
            if (result < sum) {
                result = sum;
            }
        }
        System.out.println(result);
    } main {
        Scanner scanner = new Scanner(System.in);

        final int N = Integer.parseInt(scanner.next());
        scanner.nextLine();// To get rid of new line
        final String A1 = scanner.nextLine();
        final String A2 = scanner.nextLine();

        String[] A1Array = A1.split(" ");
        String[] A2Array = A2.split(" ");

        int[][] AIJ = new int[2][N];

        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                if (i == 0) {
                    AIJ[0][j] = Integer.parseInt(A1Array[j]);
                } else {
                    AIJ[1][j] = Integer.parseInt(A2Array[j]);
                }
            }
        }

        int result = 0;

        for (int i = 0; i < N; i++) {
            int I = 0;
            int sum = 0;
            for (int j = 0; j < N; j++) {
                if (j == i) {
                    sum += AIJ[0][j];
                    I = 1;
                }
                sum += AIJ[I][j];

            }
            if (result < sum) {
                result = sum;
            }
        }
        System.out.println(result);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) final int N = Integer.parseInt(scanner.next()); N Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner scanner.nextLine() scanner.nextLine scanner final String A1 = scanner.nextLine(); A1 scanner.nextLine() scanner.nextLine scanner final String A2 = scanner.nextLine(); A2 scanner.nextLine() scanner.nextLine scanner String[] A1Array = A1.split(" "); A1Array A1.split(" ") A1.split A1 " " String[] A2Array = A2.split(" "); A2Array A2.split(" ") A2.split A2 " " int[][] AIJ = new int[2][N]; AIJ new int[2][N] 2 N for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                if (i == 0) {
                    AIJ[0][j] = Integer.parseInt(A1Array[j]);
                } else {
                    AIJ[1][j] = Integer.parseInt(A2Array[j]);
                }
            }
        } int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
            for (int j = 0; j < N; j++) {
                if (i == 0) {
                    AIJ[0][j] = Integer.parseInt(A1Array[j]);
                } else {
                    AIJ[1][j] = Integer.parseInt(A2Array[j]);
                }
            }
        } {
            for (int j = 0; j < N; j++) {
                if (i == 0) {
                    AIJ[0][j] = Integer.parseInt(A1Array[j]);
                } else {
                    AIJ[1][j] = Integer.parseInt(A2Array[j]);
                }
            }
        } for (int j = 0; j < N; j++) {
                if (i == 0) {
                    AIJ[0][j] = Integer.parseInt(A1Array[j]);
                } else {
                    AIJ[1][j] = Integer.parseInt(A2Array[j]);
                }
            } int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
                if (i == 0) {
                    AIJ[0][j] = Integer.parseInt(A1Array[j]);
                } else {
                    AIJ[1][j] = Integer.parseInt(A2Array[j]);
                }
            } {
                if (i == 0) {
                    AIJ[0][j] = Integer.parseInt(A1Array[j]);
                } else {
                    AIJ[1][j] = Integer.parseInt(A2Array[j]);
                }
            } if (i == 0) {
                    AIJ[0][j] = Integer.parseInt(A1Array[j]);
                } else {
                    AIJ[1][j] = Integer.parseInt(A2Array[j]);
                } i == 0 i 0 {
                    AIJ[0][j] = Integer.parseInt(A1Array[j]);
                } AIJ[0][j] = Integer.parseInt(A1Array[j]) AIJ[0][j] AIJ[0] AIJ 0 j Integer.parseInt(A1Array[j]) Integer.parseInt Integer A1Array[j] A1Array j {
                    AIJ[1][j] = Integer.parseInt(A2Array[j]);
                } AIJ[1][j] = Integer.parseInt(A2Array[j]) AIJ[1][j] AIJ[1] AIJ 1 j Integer.parseInt(A2Array[j]) Integer.parseInt Integer A2Array[j] A2Array j int result = 0; result 0 for (int i = 0; i < N; i++) {
            int I = 0;
            int sum = 0;
            for (int j = 0; j < N; j++) {
                if (j == i) {
                    sum += AIJ[0][j];
                    I = 1;
                }
                sum += AIJ[I][j];

            }
            if (result < sum) {
                result = sum;
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            int I = 0;
            int sum = 0;
            for (int j = 0; j < N; j++) {
                if (j == i) {
                    sum += AIJ[0][j];
                    I = 1;
                }
                sum += AIJ[I][j];

            }
            if (result < sum) {
                result = sum;
            }
        } {
            int I = 0;
            int sum = 0;
            for (int j = 0; j < N; j++) {
                if (j == i) {
                    sum += AIJ[0][j];
                    I = 1;
                }
                sum += AIJ[I][j];

            }
            if (result < sum) {
                result = sum;
            }
        } int I = 0; I 0 int sum = 0; sum 0 for (int j = 0; j < N; j++) {
                if (j == i) {
                    sum += AIJ[0][j];
                    I = 1;
                }
                sum += AIJ[I][j];

            } int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
                if (j == i) {
                    sum += AIJ[0][j];
                    I = 1;
                }
                sum += AIJ[I][j];

            } {
                if (j == i) {
                    sum += AIJ[0][j];
                    I = 1;
                }
                sum += AIJ[I][j];

            } if (j == i) {
                    sum += AIJ[0][j];
                    I = 1;
                } j == i j i {
                    sum += AIJ[0][j];
                    I = 1;
                } sum += AIJ[0][j] sum AIJ[0][j] AIJ[0] AIJ 0 j I = 1 I 1 sum += AIJ[I][j] sum AIJ[I][j] AIJ[I] AIJ I j if (result < sum) {
                result = sum;
            } result < sum result sum {
                result = sum;
            } result = sum result sum System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        final int N = Integer.parseInt(scanner.next());
        scanner.nextLine();// To get rid of new line
        final String A1 = scanner.nextLine();
        final String A2 = scanner.nextLine();

        String[] A1Array = A1.split(" ");
        String[] A2Array = A2.split(" ");

        int[][] AIJ = new int[2][N];

        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                if (i == 0) {
                    AIJ[0][j] = Integer.parseInt(A1Array[j]);
                } else {
                    AIJ[1][j] = Integer.parseInt(A2Array[j]);
                }
            }
        }

        int result = 0;

        for (int i = 0; i < N; i++) {
            int I = 0;
            int sum = 0;
            for (int j = 0; j < N; j++) {
                if (j == i) {
                    sum += AIJ[0][j];
                    I = 1;
                }
                sum += AIJ[I][j];

            }
            if (result < sum) {
                result = sum;
            }
        }
        System.out.println(result);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        final int N = Integer.parseInt(scanner.next());
        scanner.nextLine();// To get rid of new line
        final String A1 = scanner.nextLine();
        final String A2 = scanner.nextLine();

        String[] A1Array = A1.split(" ");
        String[] A2Array = A2.split(" ");

        int[][] AIJ = new int[2][N];

        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                if (i == 0) {
                    AIJ[0][j] = Integer.parseInt(A1Array[j]);
                } else {
                    AIJ[1][j] = Integer.parseInt(A2Array[j]);
                }
            }
        }

        int result = 0;

        for (int i = 0; i < N; i++) {
            int I = 0;
            int sum = 0;
            for (int j = 0; j < N; j++) {
                if (j == i) {
                    sum += AIJ[0][j];
                    I = 1;
                }
                sum += AIJ[I][j];

            }
            if (result < sum) {
                result = sum;
            }
        }
        System.out.println(result);
    }
} Main
import java.util.Scanner;

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

        final int N = Integer.parseInt(scanner.next());
        scanner.nextLine();// To get rid of new line
        final String A1 = scanner.nextLine();
        final String A2 = scanner.nextLine();

        String[] A1Array = A1.split(" ");
        String[] A2Array = A2.split(" ");

        int[][] AIJ = new int[2][N];

        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                if (i == 0) {
                    AIJ[0][j] = Integer.parseInt(A1Array[j]);
                } else {
                    AIJ[1][j] = Integer.parseInt(A2Array[j]);
                }
            }
        }

        int result = 0;

        for (int i = 0; i < N; i++) {
            int I = 0;
            int sum = 0;
            for (int j = 0; j < N; j++) {
                if (j == i) {
                    sum += AIJ[0][j];
                    I = 1;
                }
                sum += AIJ[I][j];

            }
            if (result < sum) {
                result = sum;
            }
        }
        System.out.println(result);
    }
}