import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;

class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a1 = new int[n];
        int[] a2 = new int[n];
        for (int i = 0; i < n; i++) {
            a1[i] = sc.nextInt();

        }
        for (int i = 0; i < n; i++) {
            a2[i] = sc.nextInt();

        }
        int result = 0;
        int before = 0;
        for (int i = 0; i < n; i++) {
            int candies = a1[i] + before;

            for (int j = i; j < n; j++) {
                candies += a2[j];
            }

            if (candies > result) {
                result = candies;
            }

            before += a1[i];
        }
        System.out.println(result);
    }
} import java.math.BigDecimal; BigDecimal java.math import java.util.*; util.* java import java.util.stream.Collectors; Collectors java.util.stream class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a1 = new int[n];
        int[] a2 = new int[n];
        for (int i = 0; i < n; i++) {
            a1[i] = sc.nextInt();

        }
        for (int i = 0; i < n; i++) {
            a2[i] = sc.nextInt();

        }
        int result = 0;
        int before = 0;
        for (int i = 0; i < n; i++) {
            int candies = a1[i] + before;

            for (int j = i; j < n; j++) {
                candies += a2[j];
            }

            if (candies > result) {
                result = candies;
            }

            before += a1[i];
        }
        System.out.println(result);
    }
} Main public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a1 = new int[n];
        int[] a2 = new int[n];
        for (int i = 0; i < n; i++) {
            a1[i] = sc.nextInt();

        }
        for (int i = 0; i < n; i++) {
            a2[i] = sc.nextInt();

        }
        int result = 0;
        int before = 0;
        for (int i = 0; i < n; i++) {
            int candies = a1[i] + before;

            for (int j = i; j < n; j++) {
                candies += a2[j];
            }

            if (candies > result) {
                result = candies;
            }

            before += a1[i];
        }
        System.out.println(result);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a1 = new int[n];
        int[] a2 = new int[n];
        for (int i = 0; i < n; i++) {
            a1[i] = sc.nextInt();

        }
        for (int i = 0; i < n; i++) {
            a2[i] = sc.nextInt();

        }
        int result = 0;
        int before = 0;
        for (int i = 0; i < n; i++) {
            int candies = a1[i] + before;

            for (int j = i; j < n; j++) {
                candies += a2[j];
            }

            if (candies > result) {
                result = candies;
            }

            before += a1[i];
        }
        System.out.println(result);
    } 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]; a1 new int[n] n int[] a2 = new int[n]; a2 new int[n] n for (int i = 0; i < n; i++) {
            a1[i] = sc.nextInt();

        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            a1[i] = sc.nextInt();

        } {
            a1[i] = sc.nextInt();

        } a1[i] = sc.nextInt() a1[i] a1 i sc.nextInt() sc.nextInt sc for (int i = 0; i < n; i++) {
            a2[i] = sc.nextInt();

        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            a2[i] = sc.nextInt();

        } {
            a2[i] = sc.nextInt();

        } a2[i] = sc.nextInt() a2[i] a2 i sc.nextInt() sc.nextInt sc int result = 0; result 0 int before = 0; before 0 for (int i = 0; i < n; i++) {
            int candies = a1[i] + before;

            for (int j = i; j < n; j++) {
                candies += a2[j];
            }

            if (candies > result) {
                result = candies;
            }

            before += a1[i];
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int candies = a1[i] + before;

            for (int j = i; j < n; j++) {
                candies += a2[j];
            }

            if (candies > result) {
                result = candies;
            }

            before += a1[i];
        } {
            int candies = a1[i] + before;

            for (int j = i; j < n; j++) {
                candies += a2[j];
            }

            if (candies > result) {
                result = candies;
            }

            before += a1[i];
        } int candies = a1[i] + before; candies a1[i] + before a1[i] a1 i before for (int j = i; j < n; j++) {
                candies += a2[j];
            } int j = i; int j = i; j i j < n j n j++ j++ j {
                candies += a2[j];
            } {
                candies += a2[j];
            } candies += a2[j] candies a2[j] a2 j if (candies > result) {
                result = candies;
            } candies > result candies result {
                result = candies;
            } result = candies result candies before += a1[i] before a1[i] a1 i System.out.println(result) System.out.println System.out System System.out result String args[] args
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;

class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a1 = new int[n];
        int[] a2 = new int[n];
        for (int i = 0; i < n; i++) {
            a1[i] = sc.nextInt();

        }
        for (int i = 0; i < n; i++) {
            a2[i] = sc.nextInt();

        }
        int result = 0;
        int before = 0;
        for (int i = 0; i < n; i++) {
            int candies = a1[i] + before;

            for (int j = i; j < n; j++) {
                candies += a2[j];
            }

            if (candies > result) {
                result = candies;
            }

            before += a1[i];
        }
        System.out.println(result);
    }
}