import java.util.HashSet;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;
import java.util.Set;

public class Main {
    public static void main(String[] args) {

        int N;
        int[] A1i;
        int[] A2i;
        Set<Integer> searched = new HashSet<>();
        Queue<Integer> queue = new LinkedList<>();
        try (Scanner sc = new Scanner(System.in)) {
            N = sc.nextInt();
            A1i = new int[N];
            A2i = new int[N];
            for (int i = 0; i < N; i++) {
                A1i[i] = sc.nextInt();
            }
            for (int i = 0; i < N; i++) {
                A2i[i] = sc.nextInt();
            }
        }
        int[] Sum1 = new int[N];
        int sum1 = 0;
        for (int i = 0; i < N; i++) {
            sum1 += A1i[i];
            Sum1[i] = sum1;
        }
        int[] Sum2 = new int[N];
        int sum2 = 0;
        for (int i = N - 1; i >= 0; i--) {
            sum2 += A2i[i];
            Sum2[i] = sum2;
        }
        int result = 0;
        for (int i = 0; i < N; i++) {
            if (result < Sum1[i] + Sum2[i]) {
                result = Sum1[i] + Sum2[i];
            }
        }
        System.out.println(result);

    }
} import java.util.HashSet; HashSet java.util import java.util.LinkedList; LinkedList java.util import java.util.Queue; Queue java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {
    public static void main(String[] args) {

        int N;
        int[] A1i;
        int[] A2i;
        Set<Integer> searched = new HashSet<>();
        Queue<Integer> queue = new LinkedList<>();
        try (Scanner sc = new Scanner(System.in)) {
            N = sc.nextInt();
            A1i = new int[N];
            A2i = new int[N];
            for (int i = 0; i < N; i++) {
                A1i[i] = sc.nextInt();
            }
            for (int i = 0; i < N; i++) {
                A2i[i] = sc.nextInt();
            }
        }
        int[] Sum1 = new int[N];
        int sum1 = 0;
        for (int i = 0; i < N; i++) {
            sum1 += A1i[i];
            Sum1[i] = sum1;
        }
        int[] Sum2 = new int[N];
        int sum2 = 0;
        for (int i = N - 1; i >= 0; i--) {
            sum2 += A2i[i];
            Sum2[i] = sum2;
        }
        int result = 0;
        for (int i = 0; i < N; i++) {
            if (result < Sum1[i] + Sum2[i]) {
                result = Sum1[i] + Sum2[i];
            }
        }
        System.out.println(result);

    }
} Main public static void main(String[] args) {

        int N;
        int[] A1i;
        int[] A2i;
        Set<Integer> searched = new HashSet<>();
        Queue<Integer> queue = new LinkedList<>();
        try (Scanner sc = new Scanner(System.in)) {
            N = sc.nextInt();
            A1i = new int[N];
            A2i = new int[N];
            for (int i = 0; i < N; i++) {
                A1i[i] = sc.nextInt();
            }
            for (int i = 0; i < N; i++) {
                A2i[i] = sc.nextInt();
            }
        }
        int[] Sum1 = new int[N];
        int sum1 = 0;
        for (int i = 0; i < N; i++) {
            sum1 += A1i[i];
            Sum1[i] = sum1;
        }
        int[] Sum2 = new int[N];
        int sum2 = 0;
        for (int i = N - 1; i >= 0; i--) {
            sum2 += A2i[i];
            Sum2[i] = sum2;
        }
        int result = 0;
        for (int i = 0; i < N; i++) {
            if (result < Sum1[i] + Sum2[i]) {
                result = Sum1[i] + Sum2[i];
            }
        }
        System.out.println(result);

    } main {

        int N;
        int[] A1i;
        int[] A2i;
        Set<Integer> searched = new HashSet<>();
        Queue<Integer> queue = new LinkedList<>();
        try (Scanner sc = new Scanner(System.in)) {
            N = sc.nextInt();
            A1i = new int[N];
            A2i = new int[N];
            for (int i = 0; i < N; i++) {
                A1i[i] = sc.nextInt();
            }
            for (int i = 0; i < N; i++) {
                A2i[i] = sc.nextInt();
            }
        }
        int[] Sum1 = new int[N];
        int sum1 = 0;
        for (int i = 0; i < N; i++) {
            sum1 += A1i[i];
            Sum1[i] = sum1;
        }
        int[] Sum2 = new int[N];
        int sum2 = 0;
        for (int i = N - 1; i >= 0; i--) {
            sum2 += A2i[i];
            Sum2[i] = sum2;
        }
        int result = 0;
        for (int i = 0; i < N; i++) {
            if (result < Sum1[i] + Sum2[i]) {
                result = Sum1[i] + Sum2[i];
            }
        }
        System.out.println(result);

    } int N; N int[] A1i; A1i int[] A2i; A2i Set<Integer> searched = new HashSet<>(); searched new HashSet<>() Queue<Integer> queue = new LinkedList<>(); queue new LinkedList<>() try (Scanner sc = new Scanner(System.in)) {
            N = sc.nextInt();
            A1i = new int[N];
            A2i = new int[N];
            for (int i = 0; i < N; i++) {
                A1i[i] = sc.nextInt();
            }
            for (int i = 0; i < N; i++) {
                A2i[i] = sc.nextInt();
            }
        } {
            N = sc.nextInt();
            A1i = new int[N];
            A2i = new int[N];
            for (int i = 0; i < N; i++) {
                A1i[i] = sc.nextInt();
            }
            for (int i = 0; i < N; i++) {
                A2i[i] = sc.nextInt();
            }
        } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) N = sc.nextInt() N sc.nextInt() sc.nextInt sc A1i = new int[N] A1i new int[N] N A2i = new int[N] A2i new int[N] N for (int i = 0; i < N; i++) {
                A1i[i] = sc.nextInt();
            } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                A1i[i] = sc.nextInt();
            } {
                A1i[i] = sc.nextInt();
            } A1i[i] = sc.nextInt() A1i[i] A1i i sc.nextInt() sc.nextInt sc for (int i = 0; i < N; i++) {
                A2i[i] = sc.nextInt();
            } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                A2i[i] = sc.nextInt();
            } {
                A2i[i] = sc.nextInt();
            } A2i[i] = sc.nextInt() A2i[i] A2i i sc.nextInt() sc.nextInt sc int[] Sum1 = new int[N]; Sum1 new int[N] N int sum1 = 0; sum1 0 for (int i = 0; i < N; i++) {
            sum1 += A1i[i];
            Sum1[i] = sum1;
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            sum1 += A1i[i];
            Sum1[i] = sum1;
        } {
            sum1 += A1i[i];
            Sum1[i] = sum1;
        } sum1 += A1i[i] sum1 A1i[i] A1i i Sum1[i] = sum1 Sum1[i] Sum1 i sum1 int[] Sum2 = new int[N]; Sum2 new int[N] N int sum2 = 0; sum2 0 for (int i = N - 1; i >= 0; i--) {
            sum2 += A2i[i];
            Sum2[i] = sum2;
        } int i = N - 1; int i = N - 1; i N - 1 N 1 i >= 0 i 0 i-- i-- i {
            sum2 += A2i[i];
            Sum2[i] = sum2;
        } {
            sum2 += A2i[i];
            Sum2[i] = sum2;
        } sum2 += A2i[i] sum2 A2i[i] A2i i Sum2[i] = sum2 Sum2[i] Sum2 i sum2 int result = 0; result 0 for (int i = 0; i < N; i++) {
            if (result < Sum1[i] + Sum2[i]) {
                result = Sum1[i] + Sum2[i];
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            if (result < Sum1[i] + Sum2[i]) {
                result = Sum1[i] + Sum2[i];
            }
        } {
            if (result < Sum1[i] + Sum2[i]) {
                result = Sum1[i] + Sum2[i];
            }
        } if (result < Sum1[i] + Sum2[i]) {
                result = Sum1[i] + Sum2[i];
            } result < Sum1[i] + Sum2[i] result Sum1[i] + Sum2[i] Sum1[i] Sum1 i Sum2[i] Sum2 i {
                result = Sum1[i] + Sum2[i];
            } result = Sum1[i] + Sum2[i] result Sum1[i] + Sum2[i] Sum1[i] Sum1 i Sum2[i] Sum2 i 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) {

        int N;
        int[] A1i;
        int[] A2i;
        Set<Integer> searched = new HashSet<>();
        Queue<Integer> queue = new LinkedList<>();
        try (Scanner sc = new Scanner(System.in)) {
            N = sc.nextInt();
            A1i = new int[N];
            A2i = new int[N];
            for (int i = 0; i < N; i++) {
                A1i[i] = sc.nextInt();
            }
            for (int i = 0; i < N; i++) {
                A2i[i] = sc.nextInt();
            }
        }
        int[] Sum1 = new int[N];
        int sum1 = 0;
        for (int i = 0; i < N; i++) {
            sum1 += A1i[i];
            Sum1[i] = sum1;
        }
        int[] Sum2 = new int[N];
        int sum2 = 0;
        for (int i = N - 1; i >= 0; i--) {
            sum2 += A2i[i];
            Sum2[i] = sum2;
        }
        int result = 0;
        for (int i = 0; i < N; i++) {
            if (result < Sum1[i] + Sum2[i]) {
                result = Sum1[i] + Sum2[i];
            }
        }
        System.out.println(result);

    }
} public class Main {
    public static void main(String[] args) {

        int N;
        int[] A1i;
        int[] A2i;
        Set<Integer> searched = new HashSet<>();
        Queue<Integer> queue = new LinkedList<>();
        try (Scanner sc = new Scanner(System.in)) {
            N = sc.nextInt();
            A1i = new int[N];
            A2i = new int[N];
            for (int i = 0; i < N; i++) {
                A1i[i] = sc.nextInt();
            }
            for (int i = 0; i < N; i++) {
                A2i[i] = sc.nextInt();
            }
        }
        int[] Sum1 = new int[N];
        int sum1 = 0;
        for (int i = 0; i < N; i++) {
            sum1 += A1i[i];
            Sum1[i] = sum1;
        }
        int[] Sum2 = new int[N];
        int sum2 = 0;
        for (int i = N - 1; i >= 0; i--) {
            sum2 += A2i[i];
            Sum2[i] = sum2;
        }
        int result = 0;
        for (int i = 0; i < N; i++) {
            if (result < Sum1[i] + Sum2[i]) {
                result = Sum1[i] + Sum2[i];
            }
        }
        System.out.println(result);

    }
} Main
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;
import java.util.Set;

public class Main {
    public static void main(String[] args) {

        int N;
        int[] A1i;
        int[] A2i;
        Set<Integer> searched = new HashSet<>();
        Queue<Integer> queue = new LinkedList<>();
        try (Scanner sc = new Scanner(System.in)) {
            N = sc.nextInt();
            A1i = new int[N];
            A2i = new int[N];
            for (int i = 0; i < N; i++) {
                A1i[i] = sc.nextInt();
            }
            for (int i = 0; i < N; i++) {
                A2i[i] = sc.nextInt();
            }
        }
        int[] Sum1 = new int[N];
        int sum1 = 0;
        for (int i = 0; i < N; i++) {
            sum1 += A1i[i];
            Sum1[i] = sum1;
        }
        int[] Sum2 = new int[N];
        int sum2 = 0;
        for (int i = N - 1; i >= 0; i--) {
            sum2 += A2i[i];
            Sum2[i] = sum2;
        }
        int result = 0;
        for (int i = 0; i < N; i++) {
            if (result < Sum1[i] + Sum2[i]) {
                result = Sum1[i] + Sum2[i];
            }
        }
        System.out.println(result);

    }
}
