import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arraya = new int[n];
        for (int i = 0; i < n; i++) {
            arraya[i] = sc.nextInt();
        }
        int[] arrayb = new int[n];
        for (int i = 0; i < n; i++) {
            arrayb[i] = sc.nextInt();
        }
        
        int[] suma = new int[n];
        suma[0] = arraya[0];
        for (int i = 1; i < n; i++) {
            suma[i] = suma[i-1] + arraya[i];
        }
        // System.out.println(Arrays.toString(suma));
        
        int[] sumb = new int[n];
        sumb[n-1] = arrayb[n-1];
        for (int i = n-2; i >= 0; i--) {
            sumb[i] = sumb[i+1] + arrayb[i];
        }
        // System.out.println(Arrays.toString(sumb));
        
        int max = 0;
        for (int i = 0; i < n; i++) {
            max = Math.max(max, suma[i] + sumb[i]);
        }
        System.out.println(max);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arraya = new int[n];
        for (int i = 0; i < n; i++) {
            arraya[i] = sc.nextInt();
        }
        int[] arrayb = new int[n];
        for (int i = 0; i < n; i++) {
            arrayb[i] = sc.nextInt();
        }
        
        int[] suma = new int[n];
        suma[0] = arraya[0];
        for (int i = 1; i < n; i++) {
            suma[i] = suma[i-1] + arraya[i];
        }
        // System.out.println(Arrays.toString(suma));
        
        int[] sumb = new int[n];
        sumb[n-1] = arrayb[n-1];
        for (int i = n-2; i >= 0; i--) {
            sumb[i] = sumb[i+1] + arrayb[i];
        }
        // System.out.println(Arrays.toString(sumb));
        
        int max = 0;
        for (int i = 0; i < n; i++) {
            max = Math.max(max, suma[i] + sumb[i]);
        }
        System.out.println(max);
    }
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arraya = new int[n];
        for (int i = 0; i < n; i++) {
            arraya[i] = sc.nextInt();
        }
        int[] arrayb = new int[n];
        for (int i = 0; i < n; i++) {
            arrayb[i] = sc.nextInt();
        }
        
        int[] suma = new int[n];
        suma[0] = arraya[0];
        for (int i = 1; i < n; i++) {
            suma[i] = suma[i-1] + arraya[i];
        }
        // System.out.println(Arrays.toString(suma));
        
        int[] sumb = new int[n];
        sumb[n-1] = arrayb[n-1];
        for (int i = n-2; i >= 0; i--) {
            sumb[i] = sumb[i+1] + arrayb[i];
        }
        // System.out.println(Arrays.toString(sumb));
        
        int max = 0;
        for (int i = 0; i < n; i++) {
            max = Math.max(max, suma[i] + sumb[i]);
        }
        System.out.println(max);
    } main {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arraya = new int[n];
        for (int i = 0; i < n; i++) {
            arraya[i] = sc.nextInt();
        }
        int[] arrayb = new int[n];
        for (int i = 0; i < n; i++) {
            arrayb[i] = sc.nextInt();
        }
        
        int[] suma = new int[n];
        suma[0] = arraya[0];
        for (int i = 1; i < n; i++) {
            suma[i] = suma[i-1] + arraya[i];
        }
        // System.out.println(Arrays.toString(suma));
        
        int[] sumb = new int[n];
        sumb[n-1] = arrayb[n-1];
        for (int i = n-2; i >= 0; i--) {
            sumb[i] = sumb[i+1] + arrayb[i];
        }
        // System.out.println(Arrays.toString(sumb));
        
        int max = 0;
        for (int i = 0; i < n; i++) {
            max = Math.max(max, suma[i] + sumb[i]);
        }
        System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] arraya = new int[n]; arraya new int[n] n for (int i = 0; i < n; i++) {
            arraya[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            arraya[i] = sc.nextInt();
        } {
            arraya[i] = sc.nextInt();
        } arraya[i] = sc.nextInt() arraya[i] arraya i sc.nextInt() sc.nextInt sc int[] arrayb = new int[n]; arrayb new int[n] n for (int i = 0; i < n; i++) {
            arrayb[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            arrayb[i] = sc.nextInt();
        } {
            arrayb[i] = sc.nextInt();
        } arrayb[i] = sc.nextInt() arrayb[i] arrayb i sc.nextInt() sc.nextInt sc int[] suma = new int[n]; suma new int[n] n suma[0] = arraya[0] suma[0] suma 0 arraya[0] arraya 0 for (int i = 1; i < n; i++) {
            suma[i] = suma[i-1] + arraya[i];
        } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
            suma[i] = suma[i-1] + arraya[i];
        } {
            suma[i] = suma[i-1] + arraya[i];
        } suma[i] = suma[i-1] + arraya[i] suma[i] suma i suma[i-1] + arraya[i] suma[i-1] suma i-1 i 1 arraya[i] arraya i int[] sumb = new int[n]; sumb new int[n] n sumb[n-1] = arrayb[n-1] sumb[n-1] sumb n-1 n 1 arrayb[n-1] arrayb n-1 n 1 for (int i = n-2; i >= 0; i--) {
            sumb[i] = sumb[i+1] + arrayb[i];
        } int i = n-2; int i = n-2; i n-2 n 2 i >= 0 i 0 i-- i-- i {
            sumb[i] = sumb[i+1] + arrayb[i];
        } {
            sumb[i] = sumb[i+1] + arrayb[i];
        } sumb[i] = sumb[i+1] + arrayb[i] sumb[i] sumb i sumb[i+1] + arrayb[i] sumb[i+1] sumb i+1 i 1 arrayb[i] arrayb i int max = 0; max 0 for (int i = 0; i < n; i++) {
            max = Math.max(max, suma[i] + sumb[i]);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            max = Math.max(max, suma[i] + sumb[i]);
        } {
            max = Math.max(max, suma[i] + sumb[i]);
        } max = Math.max(max, suma[i] + sumb[i]) max Math.max(max, suma[i] + sumb[i]) Math.max Math max suma[i] + sumb[i] suma[i] suma i sumb[i] sumb i 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) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arraya = new int[n];
        for (int i = 0; i < n; i++) {
            arraya[i] = sc.nextInt();
        }
        int[] arrayb = new int[n];
        for (int i = 0; i < n; i++) {
            arrayb[i] = sc.nextInt();
        }
        
        int[] suma = new int[n];
        suma[0] = arraya[0];
        for (int i = 1; i < n; i++) {
            suma[i] = suma[i-1] + arraya[i];
        }
        // System.out.println(Arrays.toString(suma));
        
        int[] sumb = new int[n];
        sumb[n-1] = arrayb[n-1];
        for (int i = n-2; i >= 0; i--) {
            sumb[i] = sumb[i+1] + arrayb[i];
        }
        // System.out.println(Arrays.toString(sumb));
        
        int max = 0;
        for (int i = 0; i < n; i++) {
            max = Math.max(max, suma[i] + sumb[i]);
        }
        System.out.println(max);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arraya = new int[n];
        for (int i = 0; i < n; i++) {
            arraya[i] = sc.nextInt();
        }
        int[] arrayb = new int[n];
        for (int i = 0; i < n; i++) {
            arrayb[i] = sc.nextInt();
        }
        
        int[] suma = new int[n];
        suma[0] = arraya[0];
        for (int i = 1; i < n; i++) {
            suma[i] = suma[i-1] + arraya[i];
        }
        // System.out.println(Arrays.toString(suma));
        
        int[] sumb = new int[n];
        sumb[n-1] = arrayb[n-1];
        for (int i = n-2; i >= 0; i--) {
            sumb[i] = sumb[i+1] + arrayb[i];
        }
        // System.out.println(Arrays.toString(sumb));
        
        int max = 0;
        for (int i = 0; i < n; i++) {
            max = Math.max(max, suma[i] + sumb[i]);
        }
        System.out.println(max);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arraya = new int[n];
        for (int i = 0; i < n; i++) {
            arraya[i] = sc.nextInt();
        }
        int[] arrayb = new int[n];
        for (int i = 0; i < n; i++) {
            arrayb[i] = sc.nextInt();
        }
        
        int[] suma = new int[n];
        suma[0] = arraya[0];
        for (int i = 1; i < n; i++) {
            suma[i] = suma[i-1] + arraya[i];
        }
        // System.out.println(Arrays.toString(suma));
        
        int[] sumb = new int[n];
        sumb[n-1] = arrayb[n-1];
        for (int i = n-2; i >= 0; i--) {
            sumb[i] = sumb[i+1] + arrayb[i];
        }
        // System.out.println(Arrays.toString(sumb));
        
        int max = 0;
        for (int i = 0; i < n; i++) {
            max = Math.max(max, suma[i] + sumb[i]);
        }
        System.out.println(max);
    }
}
