import java.util.Scanner;

public class Main {

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

        for(int i = 0; i < n; i++){
            upper[i] = sc.nextInt();
        }
        int maxSum = upper[0];
        for(int j = 0; j < n; j++){
            lower[j] = sc.nextInt();
            maxSum += lower[j];
        }

        int tmpSum = maxSum;
        for(int k = 1; k < n; k++){
            tmpSum +=  (upper[k] - lower[k-1]);
            if(tmpSum > maxSum){
                maxSum = tmpSum;
            }
        }
        System.out.println(maxSum);
    }

} 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[] upper = new int[n];
        int[] lower = new int[n];

        for(int i = 0; i < n; i++){
            upper[i] = sc.nextInt();
        }
        int maxSum = upper[0];
        for(int j = 0; j < n; j++){
            lower[j] = sc.nextInt();
            maxSum += lower[j];
        }

        int tmpSum = maxSum;
        for(int k = 1; k < n; k++){
            tmpSum +=  (upper[k] - lower[k-1]);
            if(tmpSum > maxSum){
                maxSum = tmpSum;
            }
        }
        System.out.println(maxSum);
    }

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

        for(int i = 0; i < n; i++){
            upper[i] = sc.nextInt();
        }
        int maxSum = upper[0];
        for(int j = 0; j < n; j++){
            lower[j] = sc.nextInt();
            maxSum += lower[j];
        }

        int tmpSum = maxSum;
        for(int k = 1; k < n; k++){
            tmpSum +=  (upper[k] - lower[k-1]);
            if(tmpSum > maxSum){
                maxSum = tmpSum;
            }
        }
        System.out.println(maxSum);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] upper = new int[n];
        int[] lower = new int[n];

        for(int i = 0; i < n; i++){
            upper[i] = sc.nextInt();
        }
        int maxSum = upper[0];
        for(int j = 0; j < n; j++){
            lower[j] = sc.nextInt();
            maxSum += lower[j];
        }

        int tmpSum = maxSum;
        for(int k = 1; k < n; k++){
            tmpSum +=  (upper[k] - lower[k-1]);
            if(tmpSum > maxSum){
                maxSum = tmpSum;
            }
        }
        System.out.println(maxSum);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] upper = new int[n]; upper new int[n] n int[] lower = new int[n]; lower new int[n] n for(int i = 0; i < n; i++){
            upper[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            upper[i] = sc.nextInt();
        } {
            upper[i] = sc.nextInt();
        } upper[i] = sc.nextInt() upper[i] upper i sc.nextInt() sc.nextInt sc int maxSum = upper[0]; maxSum upper[0] upper 0 for(int j = 0; j < n; j++){
            lower[j] = sc.nextInt();
            maxSum += lower[j];
        } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
            lower[j] = sc.nextInt();
            maxSum += lower[j];
        } {
            lower[j] = sc.nextInt();
            maxSum += lower[j];
        } lower[j] = sc.nextInt() lower[j] lower j sc.nextInt() sc.nextInt sc maxSum += lower[j] maxSum lower[j] lower j int tmpSum = maxSum; tmpSum maxSum for(int k = 1; k < n; k++){
            tmpSum +=  (upper[k] - lower[k-1]);
            if(tmpSum > maxSum){
                maxSum = tmpSum;
            }
        } int k = 1; int k = 1; k 1 k < n k n k++ k++ k {
            tmpSum +=  (upper[k] - lower[k-1]);
            if(tmpSum > maxSum){
                maxSum = tmpSum;
            }
        } {
            tmpSum +=  (upper[k] - lower[k-1]);
            if(tmpSum > maxSum){
                maxSum = tmpSum;
            }
        } tmpSum +=  (upper[k] - lower[k-1]) tmpSum (upper[k] - lower[k-1]) upper[k] upper k lower[k-1] lower k-1 k 1 if(tmpSum > maxSum){
                maxSum = tmpSum;
            } tmpSum > maxSum tmpSum maxSum {
                maxSum = tmpSum;
            } maxSum = tmpSum maxSum tmpSum System.out.println(maxSum) System.out.println System.out System System.out maxSum String[] args args public class Main {

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

        for(int i = 0; i < n; i++){
            upper[i] = sc.nextInt();
        }
        int maxSum = upper[0];
        for(int j = 0; j < n; j++){
            lower[j] = sc.nextInt();
            maxSum += lower[j];
        }

        int tmpSum = maxSum;
        for(int k = 1; k < n; k++){
            tmpSum +=  (upper[k] - lower[k-1]);
            if(tmpSum > maxSum){
                maxSum = tmpSum;
            }
        }
        System.out.println(maxSum);
    }

} public class Main {

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

        for(int i = 0; i < n; i++){
            upper[i] = sc.nextInt();
        }
        int maxSum = upper[0];
        for(int j = 0; j < n; j++){
            lower[j] = sc.nextInt();
            maxSum += lower[j];
        }

        int tmpSum = maxSum;
        for(int k = 1; k < n; k++){
            tmpSum +=  (upper[k] - lower[k-1]);
            if(tmpSum > maxSum){
                maxSum = tmpSum;
            }
        }
        System.out.println(maxSum);
    }

} 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[] upper = new int[n];
        int[] lower = new int[n];

        for(int i = 0; i < n; i++){
            upper[i] = sc.nextInt();
        }
        int maxSum = upper[0];
        for(int j = 0; j < n; j++){
            lower[j] = sc.nextInt();
            maxSum += lower[j];
        }

        int tmpSum = maxSum;
        for(int k = 1; k < n; k++){
            tmpSum +=  (upper[k] - lower[k-1]);
            if(tmpSum > maxSum){
                maxSum = tmpSum;
            }
        }
        System.out.println(maxSum);
    }

}