import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.nextLine());
        String[] line1 = sc.nextLine().split(" ");
        String[] line2 = sc.nextLine().split(" ");
        sc.close();

        int[] Cum1 = new int[N + 1];
        int[] Cum2 = new int[N + 1];

        Cum1[0] = 0;
        Cum2[0] = 0;

        int tmp1 = 0;
        int tmp2 = 0;
        for (int i = 0; i < N; i++) {
            tmp1 += Integer.parseInt(line1[i]);
            tmp2 += Integer.parseInt(line2[i]);
            Cum1[i + 1] = tmp1;
            Cum2[i + 1] = tmp2;
        }

        int max = 0;
        for (int j = 1; j < N; j++) {
            int line2val = Cum2[N] - Cum2[j - 1];
            int val = Cum1[j] + line2val;
            if (val >= max) {
                max = val;
            }
        }

        if (max == 0) {
            max = Integer.parseInt(line1[0]) + Integer.parseInt(line2[0]);
        }

        System.out.println(max);
    }

} 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.nextLine());
        String[] line1 = sc.nextLine().split(" ");
        String[] line2 = sc.nextLine().split(" ");
        sc.close();

        int[] Cum1 = new int[N + 1];
        int[] Cum2 = new int[N + 1];

        Cum1[0] = 0;
        Cum2[0] = 0;

        int tmp1 = 0;
        int tmp2 = 0;
        for (int i = 0; i < N; i++) {
            tmp1 += Integer.parseInt(line1[i]);
            tmp2 += Integer.parseInt(line2[i]);
            Cum1[i + 1] = tmp1;
            Cum2[i + 1] = tmp2;
        }

        int max = 0;
        for (int j = 1; j < N; j++) {
            int line2val = Cum2[N] - Cum2[j - 1];
            int val = Cum1[j] + line2val;
            if (val >= max) {
                max = val;
            }
        }

        if (max == 0) {
            max = Integer.parseInt(line1[0]) + Integer.parseInt(line2[0]);
        }

        System.out.println(max);
    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.nextLine());
        String[] line1 = sc.nextLine().split(" ");
        String[] line2 = sc.nextLine().split(" ");
        sc.close();

        int[] Cum1 = new int[N + 1];
        int[] Cum2 = new int[N + 1];

        Cum1[0] = 0;
        Cum2[0] = 0;

        int tmp1 = 0;
        int tmp2 = 0;
        for (int i = 0; i < N; i++) {
            tmp1 += Integer.parseInt(line1[i]);
            tmp2 += Integer.parseInt(line2[i]);
            Cum1[i + 1] = tmp1;
            Cum2[i + 1] = tmp2;
        }

        int max = 0;
        for (int j = 1; j < N; j++) {
            int line2val = Cum2[N] - Cum2[j - 1];
            int val = Cum1[j] + line2val;
            if (val >= max) {
                max = val;
            }
        }

        if (max == 0) {
            max = Integer.parseInt(line1[0]) + Integer.parseInt(line2[0]);
        }

        System.out.println(max);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.nextLine());
        String[] line1 = sc.nextLine().split(" ");
        String[] line2 = sc.nextLine().split(" ");
        sc.close();

        int[] Cum1 = new int[N + 1];
        int[] Cum2 = new int[N + 1];

        Cum1[0] = 0;
        Cum2[0] = 0;

        int tmp1 = 0;
        int tmp2 = 0;
        for (int i = 0; i < N; i++) {
            tmp1 += Integer.parseInt(line1[i]);
            tmp2 += Integer.parseInt(line2[i]);
            Cum1[i + 1] = tmp1;
            Cum2[i + 1] = tmp2;
        }

        int max = 0;
        for (int j = 1; j < N; j++) {
            int line2val = Cum2[N] - Cum2[j - 1];
            int val = Cum1[j] + line2val;
            if (val >= max) {
                max = val;
            }
        }

        if (max == 0) {
            max = Integer.parseInt(line1[0]) + Integer.parseInt(line2[0]);
        }

        System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.nextLine()); N Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc String[] line1 = sc.nextLine().split(" "); line1 sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " String[] line2 = sc.nextLine().split(" "); line2 sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " sc.close() sc.close sc int[] Cum1 = new int[N + 1]; Cum1 new int[N + 1] N + 1 N 1 int[] Cum2 = new int[N + 1]; Cum2 new int[N + 1] N + 1 N 1 Cum1[0] = 0 Cum1[0] Cum1 0 0 Cum2[0] = 0 Cum2[0] Cum2 0 0 int tmp1 = 0; tmp1 0 int tmp2 = 0; tmp2 0 for (int i = 0; i < N; i++) {
            tmp1 += Integer.parseInt(line1[i]);
            tmp2 += Integer.parseInt(line2[i]);
            Cum1[i + 1] = tmp1;
            Cum2[i + 1] = tmp2;
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            tmp1 += Integer.parseInt(line1[i]);
            tmp2 += Integer.parseInt(line2[i]);
            Cum1[i + 1] = tmp1;
            Cum2[i + 1] = tmp2;
        } {
            tmp1 += Integer.parseInt(line1[i]);
            tmp2 += Integer.parseInt(line2[i]);
            Cum1[i + 1] = tmp1;
            Cum2[i + 1] = tmp2;
        } tmp1 += Integer.parseInt(line1[i]) tmp1 Integer.parseInt(line1[i]) Integer.parseInt Integer line1[i] line1 i tmp2 += Integer.parseInt(line2[i]) tmp2 Integer.parseInt(line2[i]) Integer.parseInt Integer line2[i] line2 i Cum1[i + 1] = tmp1 Cum1[i + 1] Cum1 i + 1 i 1 tmp1 Cum2[i + 1] = tmp2 Cum2[i + 1] Cum2 i + 1 i 1 tmp2 int max = 0; max 0 for (int j = 1; j < N; j++) {
            int line2val = Cum2[N] - Cum2[j - 1];
            int val = Cum1[j] + line2val;
            if (val >= max) {
                max = val;
            }
        } int j = 1; int j = 1; j 1 j < N j N j++ j++ j {
            int line2val = Cum2[N] - Cum2[j - 1];
            int val = Cum1[j] + line2val;
            if (val >= max) {
                max = val;
            }
        } {
            int line2val = Cum2[N] - Cum2[j - 1];
            int val = Cum1[j] + line2val;
            if (val >= max) {
                max = val;
            }
        } int line2val = Cum2[N] - Cum2[j - 1]; line2val Cum2[N] - Cum2[j - 1] Cum2[N] Cum2 N Cum2[j - 1] Cum2 j - 1 j 1 int val = Cum1[j] + line2val; val Cum1[j] + line2val Cum1[j] Cum1 j line2val if (val >= max) {
                max = val;
            } val >= max val max {
                max = val;
            } max = val max val if (max == 0) {
            max = Integer.parseInt(line1[0]) + Integer.parseInt(line2[0]);
        } max == 0 max 0 {
            max = Integer.parseInt(line1[0]) + Integer.parseInt(line2[0]);
        } max = Integer.parseInt(line1[0]) + Integer.parseInt(line2[0]) max Integer.parseInt(line1[0]) + Integer.parseInt(line2[0]) Integer.parseInt(line1[0]) Integer.parseInt Integer line1[0] line1 0 Integer.parseInt(line2[0]) Integer.parseInt Integer line2[0] line2 0 System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.nextLine());
        String[] line1 = sc.nextLine().split(" ");
        String[] line2 = sc.nextLine().split(" ");
        sc.close();

        int[] Cum1 = new int[N + 1];
        int[] Cum2 = new int[N + 1];

        Cum1[0] = 0;
        Cum2[0] = 0;

        int tmp1 = 0;
        int tmp2 = 0;
        for (int i = 0; i < N; i++) {
            tmp1 += Integer.parseInt(line1[i]);
            tmp2 += Integer.parseInt(line2[i]);
            Cum1[i + 1] = tmp1;
            Cum2[i + 1] = tmp2;
        }

        int max = 0;
        for (int j = 1; j < N; j++) {
            int line2val = Cum2[N] - Cum2[j - 1];
            int val = Cum1[j] + line2val;
            if (val >= max) {
                max = val;
            }
        }

        if (max == 0) {
            max = Integer.parseInt(line1[0]) + Integer.parseInt(line2[0]);
        }

        System.out.println(max);
    }

} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.nextLine());
        String[] line1 = sc.nextLine().split(" ");
        String[] line2 = sc.nextLine().split(" ");
        sc.close();

        int[] Cum1 = new int[N + 1];
        int[] Cum2 = new int[N + 1];

        Cum1[0] = 0;
        Cum2[0] = 0;

        int tmp1 = 0;
        int tmp2 = 0;
        for (int i = 0; i < N; i++) {
            tmp1 += Integer.parseInt(line1[i]);
            tmp2 += Integer.parseInt(line2[i]);
            Cum1[i + 1] = tmp1;
            Cum2[i + 1] = tmp2;
        }

        int max = 0;
        for (int j = 1; j < N; j++) {
            int line2val = Cum2[N] - Cum2[j - 1];
            int val = Cum1[j] + line2val;
            if (val >= max) {
                max = val;
            }
        }

        if (max == 0) {
            max = Integer.parseInt(line1[0]) + Integer.parseInt(line2[0]);
        }

        System.out.println(max);
    }

} 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.nextLine());
        String[] line1 = sc.nextLine().split(" ");
        String[] line2 = sc.nextLine().split(" ");
        sc.close();

        int[] Cum1 = new int[N + 1];
        int[] Cum2 = new int[N + 1];

        Cum1[0] = 0;
        Cum2[0] = 0;

        int tmp1 = 0;
        int tmp2 = 0;
        for (int i = 0; i < N; i++) {
            tmp1 += Integer.parseInt(line1[i]);
            tmp2 += Integer.parseInt(line2[i]);
            Cum1[i + 1] = tmp1;
            Cum2[i + 1] = tmp2;
        }

        int max = 0;
        for (int j = 1; j < N; j++) {
            int line2val = Cum2[N] - Cum2[j - 1];
            int val = Cum1[j] + line2val;
            if (val >= max) {
                max = val;
            }
        }

        if (max == 0) {
            max = Integer.parseInt(line1[0]) + Integer.parseInt(line2[0]);
        }

        System.out.println(max);
    }

}