import java.util.*;
import java.lang.*;


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


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