import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a1 = new int[n+1];
        int[] a2 = new int[n+1];
        for(int i = 0; i < n; i++){
            a1[i+1] = a1[i] + sc.nextInt();
            
        }
        for(int i = 0; i < n; i++){
            a2[i+1] = a2[i] + sc.nextInt();
        }
        int max = 0;
        for(int i = 0; i < n; i++){
            max = Math.max(max, a1[i+1] + a2[n] - a2[i]);
        }
        System.out.println(max);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a1 = new int[n+1];
        int[] a2 = new int[n+1];
        for(int i = 0; i < n; i++){
            a1[i+1] = a1[i] + sc.nextInt();
            
        }
        for(int i = 0; i < n; i++){
            a2[i+1] = a2[i] + sc.nextInt();
        }
        int max = 0;
        for(int i = 0; i < n; i++){
            max = Math.max(max, a1[i+1] + a2[n] - a2[i]);
        }
        System.out.println(max);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a1 = new int[n+1];
        int[] a2 = new int[n+1];
        for(int i = 0; i < n; i++){
            a1[i+1] = a1[i] + sc.nextInt();
            
        }
        for(int i = 0; i < n; i++){
            a2[i+1] = a2[i] + sc.nextInt();
        }
        int max = 0;
        for(int i = 0; i < n; i++){
            max = Math.max(max, a1[i+1] + a2[n] - a2[i]);
        }
        System.out.println(max);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a1 = new int[n+1];
        int[] a2 = new int[n+1];
        for(int i = 0; i < n; i++){
            a1[i+1] = a1[i] + sc.nextInt();
            
        }
        for(int i = 0; i < n; i++){
            a2[i+1] = a2[i] + sc.nextInt();
        }
        int max = 0;
        for(int i = 0; i < n; i++){
            max = Math.max(max, a1[i+1] + a2[n] - a2[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[] a1 = new int[n+1]; a1 new int[n+1] n+1 n 1 int[] a2 = new int[n+1]; a2 new int[n+1] n+1 n 1 for(int i = 0; i < n; i++){
            a1[i+1] = a1[i] + sc.nextInt();
            
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            a1[i+1] = a1[i] + sc.nextInt();
            
        } {
            a1[i+1] = a1[i] + sc.nextInt();
            
        } a1[i+1] = a1[i] + sc.nextInt() a1[i+1] a1 i+1 i 1 a1[i] + sc.nextInt() a1[i] a1 i sc.nextInt() sc.nextInt sc for(int i = 0; i < n; i++){
            a2[i+1] = a2[i] + sc.nextInt();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            a2[i+1] = a2[i] + sc.nextInt();
        } {
            a2[i+1] = a2[i] + sc.nextInt();
        } a2[i+1] = a2[i] + sc.nextInt() a2[i+1] a2 i+1 i 1 a2[i] + sc.nextInt() a2[i] a2 i sc.nextInt() sc.nextInt sc int max = 0; max 0 for(int i = 0; i < n; i++){
            max = Math.max(max, a1[i+1] + a2[n] - a2[i]);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            max = Math.max(max, a1[i+1] + a2[n] - a2[i]);
        } {
            max = Math.max(max, a1[i+1] + a2[n] - a2[i]);
        } max = Math.max(max, a1[i+1] + a2[n] - a2[i]) max Math.max(max, a1[i+1] + a2[n] - a2[i]) Math.max Math max a1[i+1] + a2[n] - a2[i] a1[i+1] + a2[n] a1[i+1] a1 i+1 i 1 a2[n] a2 n a2[i] a2 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 {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a1 = new int[n+1];
        int[] a2 = new int[n+1];
        for(int i = 0; i < n; i++){
            a1[i+1] = a1[i] + sc.nextInt();
            
        }
        for(int i = 0; i < n; i++){
            a2[i+1] = a2[i] + sc.nextInt();
        }
        int max = 0;
        for(int i = 0; i < n; i++){
            max = Math.max(max, a1[i+1] + a2[n] - a2[i]);
        }
        System.out.println(max);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a1 = new int[n+1];
        int[] a2 = new int[n+1];
        for(int i = 0; i < n; i++){
            a1[i+1] = a1[i] + sc.nextInt();
            
        }
        for(int i = 0; i < n; i++){
            a2[i+1] = a2[i] + sc.nextInt();
        }
        int max = 0;
        for(int i = 0; i < n; i++){
            max = Math.max(max, a1[i+1] + a2[n] - a2[i]);
        }
        System.out.println(max);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a1 = new int[n+1];
        int[] a2 = new int[n+1];
        for(int i = 0; i < n; i++){
            a1[i+1] = a1[i] + sc.nextInt();
            
        }
        for(int i = 0; i < n; i++){
            a2[i+1] = a2[i] + sc.nextInt();
        }
        int max = 0;
        for(int i = 0; i < n; i++){
            max = Math.max(max, a1[i+1] + a2[n] - a2[i]);
        }
        System.out.println(max);
    }
}
