import java.util.Scanner;

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

        int[] first = new int[n];
        int[] second = new int[n];
        int[] tmp = new int[n];
        
        for(int i = 0; i < n; i++) {
            int val = sc.nextInt();
            if(i==0) first[i] = val;
            else first[i] = first[i-1] + val;
        }
        for(int i = 0; i < n; i++) tmp[i] = sc.nextInt();
        for(int i = n-1; i >= 0; i--) {
            int val = tmp[i];
            if(i==n-1) second[i] = val;
            else second[i] = second[i+1] + val;
        }
        int res = 0;
        for(int i = 0; i < n; i++) {
            int max = Math.max(res, first[i]+second[i]);
            res = max;
        }
        System.out.println(res);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        int[] first = new int[n];
        int[] second = new int[n];
        int[] tmp = new int[n];
        
        for(int i = 0; i < n; i++) {
            int val = sc.nextInt();
            if(i==0) first[i] = val;
            else first[i] = first[i-1] + val;
        }
        for(int i = 0; i < n; i++) tmp[i] = sc.nextInt();
        for(int i = n-1; i >= 0; i--) {
            int val = tmp[i];
            if(i==n-1) second[i] = val;
            else second[i] = second[i+1] + val;
        }
        int res = 0;
        for(int i = 0; i < n; i++) {
            int max = Math.max(res, first[i]+second[i]);
            res = max;
        }
        System.out.println(res);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        int[] first = new int[n];
        int[] second = new int[n];
        int[] tmp = new int[n];
        
        for(int i = 0; i < n; i++) {
            int val = sc.nextInt();
            if(i==0) first[i] = val;
            else first[i] = first[i-1] + val;
        }
        for(int i = 0; i < n; i++) tmp[i] = sc.nextInt();
        for(int i = n-1; i >= 0; i--) {
            int val = tmp[i];
            if(i==n-1) second[i] = val;
            else second[i] = second[i+1] + val;
        }
        int res = 0;
        for(int i = 0; i < n; i++) {
            int max = Math.max(res, first[i]+second[i]);
            res = max;
        }
        System.out.println(res);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        int[] first = new int[n];
        int[] second = new int[n];
        int[] tmp = new int[n];
        
        for(int i = 0; i < n; i++) {
            int val = sc.nextInt();
            if(i==0) first[i] = val;
            else first[i] = first[i-1] + val;
        }
        for(int i = 0; i < n; i++) tmp[i] = sc.nextInt();
        for(int i = n-1; i >= 0; i--) {
            int val = tmp[i];
            if(i==n-1) second[i] = val;
            else second[i] = second[i+1] + val;
        }
        int res = 0;
        for(int i = 0; i < n; i++) {
            int max = Math.max(res, first[i]+second[i]);
            res = max;
        }
        System.out.println(res);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] first = new int[n]; first new int[n] n int[] second = new int[n]; second new int[n] n int[] tmp = new int[n]; tmp new int[n] n for(int i = 0; i < n; i++) {
            int val = sc.nextInt();
            if(i==0) first[i] = val;
            else first[i] = first[i-1] + val;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int val = sc.nextInt();
            if(i==0) first[i] = val;
            else first[i] = first[i-1] + val;
        } {
            int val = sc.nextInt();
            if(i==0) first[i] = val;
            else first[i] = first[i-1] + val;
        } int val = sc.nextInt(); val sc.nextInt() sc.nextInt sc if(i==0) first[i] = val;
            else first[i] = first[i-1] + val; i==0 i 0 first[i] = val first[i] first i val first[i] = first[i-1] + val first[i] first i first[i-1] + val first[i-1] first i-1 i 1 val for(int i = 0; i < n; i++) tmp[i] = sc.nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i tmp[i] = sc.nextInt(); tmp[i] = sc.nextInt() tmp[i] tmp i sc.nextInt() sc.nextInt sc for(int i = n-1; i >= 0; i--) {
            int val = tmp[i];
            if(i==n-1) second[i] = val;
            else second[i] = second[i+1] + val;
        } int i = n-1; int i = n-1; i n-1 n 1 i >= 0 i 0 i-- i-- i {
            int val = tmp[i];
            if(i==n-1) second[i] = val;
            else second[i] = second[i+1] + val;
        } {
            int val = tmp[i];
            if(i==n-1) second[i] = val;
            else second[i] = second[i+1] + val;
        } int val = tmp[i]; val tmp[i] tmp i if(i==n-1) second[i] = val;
            else second[i] = second[i+1] + val; i==n-1 i n-1 n 1 second[i] = val second[i] second i val second[i] = second[i+1] + val second[i] second i second[i+1] + val second[i+1] second i+1 i 1 val int res = 0; res 0 for(int i = 0; i < n; i++) {
            int max = Math.max(res, first[i]+second[i]);
            res = max;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int max = Math.max(res, first[i]+second[i]);
            res = max;
        } {
            int max = Math.max(res, first[i]+second[i]);
            res = max;
        } int max = Math.max(res, first[i]+second[i]); max Math.max(res, first[i]+second[i]) Math.max Math res first[i]+second[i] first[i] first i second[i] second i res = max res max System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        int[] first = new int[n];
        int[] second = new int[n];
        int[] tmp = new int[n];
        
        for(int i = 0; i < n; i++) {
            int val = sc.nextInt();
            if(i==0) first[i] = val;
            else first[i] = first[i-1] + val;
        }
        for(int i = 0; i < n; i++) tmp[i] = sc.nextInt();
        for(int i = n-1; i >= 0; i--) {
            int val = tmp[i];
            if(i==n-1) second[i] = val;
            else second[i] = second[i+1] + val;
        }
        int res = 0;
        for(int i = 0; i < n; i++) {
            int max = Math.max(res, first[i]+second[i]);
            res = max;
        }
        System.out.println(res);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        int[] first = new int[n];
        int[] second = new int[n];
        int[] tmp = new int[n];
        
        for(int i = 0; i < n; i++) {
            int val = sc.nextInt();
            if(i==0) first[i] = val;
            else first[i] = first[i-1] + val;
        }
        for(int i = 0; i < n; i++) tmp[i] = sc.nextInt();
        for(int i = n-1; i >= 0; i--) {
            int val = tmp[i];
            if(i==n-1) second[i] = val;
            else second[i] = second[i+1] + val;
        }
        int res = 0;
        for(int i = 0; i < n; i++) {
            int max = Math.max(res, first[i]+second[i]);
            res = max;
        }
        System.out.println(res);
    }
} Main
import java.util.Scanner;

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

        int[] first = new int[n];
        int[] second = new int[n];
        int[] tmp = new int[n];
        
        for(int i = 0; i < n; i++) {
            int val = sc.nextInt();
            if(i==0) first[i] = val;
            else first[i] = first[i-1] + val;
        }
        for(int i = 0; i < n; i++) tmp[i] = sc.nextInt();
        for(int i = n-1; i >= 0; i--) {
            int val = tmp[i];
            if(i==n-1) second[i] = val;
            else second[i] = second[i+1] + val;
        }
        int res = 0;
        for(int i = 0; i < n; i++) {
            int max = Math.max(res, first[i]+second[i]);
            res = max;
        }
        System.out.println(res);
    }
}
