import java.util.ArrayList;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        ArrayList<Integer> A1 = new ArrayList<>();
        ArrayList<Integer> A2 = new ArrayList<>();
        for (int i = 0; i < N; i++) {
            A1.add(scanner.nextInt());
        }
        for (int i = 0; i < N; i++) {
            A2.add(scanner.nextInt());
        }
        scanner.close();

        int max = 0;
        int count1 = 0;
        for (int i = 0; i < N; i++) {
            count1 += A1.get(i);
            int count2 = count1;
            for (int j = i; j < N; j++) {
                count2 += A2.get(j);
            }
            if (max < count2) {
                max = count2;
            }

        }

        System.out.println(max);
    }
} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        ArrayList<Integer> A1 = new ArrayList<>();
        ArrayList<Integer> A2 = new ArrayList<>();
        for (int i = 0; i < N; i++) {
            A1.add(scanner.nextInt());
        }
        for (int i = 0; i < N; i++) {
            A2.add(scanner.nextInt());
        }
        scanner.close();

        int max = 0;
        int count1 = 0;
        for (int i = 0; i < N; i++) {
            count1 += A1.get(i);
            int count2 = count1;
            for (int j = i; j < N; j++) {
                count2 += A2.get(j);
            }
            if (max < count2) {
                max = count2;
            }

        }

        System.out.println(max);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        ArrayList<Integer> A1 = new ArrayList<>();
        ArrayList<Integer> A2 = new ArrayList<>();
        for (int i = 0; i < N; i++) {
            A1.add(scanner.nextInt());
        }
        for (int i = 0; i < N; i++) {
            A2.add(scanner.nextInt());
        }
        scanner.close();

        int max = 0;
        int count1 = 0;
        for (int i = 0; i < N; i++) {
            count1 += A1.get(i);
            int count2 = count1;
            for (int j = i; j < N; j++) {
                count2 += A2.get(j);
            }
            if (max < count2) {
                max = count2;
            }

        }

        System.out.println(max);
    } main {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        ArrayList<Integer> A1 = new ArrayList<>();
        ArrayList<Integer> A2 = new ArrayList<>();
        for (int i = 0; i < N; i++) {
            A1.add(scanner.nextInt());
        }
        for (int i = 0; i < N; i++) {
            A2.add(scanner.nextInt());
        }
        scanner.close();

        int max = 0;
        int count1 = 0;
        for (int i = 0; i < N; i++) {
            count1 += A1.get(i);
            int count2 = count1;
            for (int j = i; j < N; j++) {
                count2 += A2.get(j);
            }
            if (max < count2) {
                max = count2;
            }

        }

        System.out.println(max);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner ArrayList<Integer> A1 = new ArrayList<>(); A1 new ArrayList<>() ArrayList<Integer> A2 = new ArrayList<>(); A2 new ArrayList<>() for (int i = 0; i < N; i++) {
            A1.add(scanner.nextInt());
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            A1.add(scanner.nextInt());
        } {
            A1.add(scanner.nextInt());
        } A1.add(scanner.nextInt()) A1.add A1 scanner.nextInt() scanner.nextInt scanner for (int i = 0; i < N; i++) {
            A2.add(scanner.nextInt());
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            A2.add(scanner.nextInt());
        } {
            A2.add(scanner.nextInt());
        } A2.add(scanner.nextInt()) A2.add A2 scanner.nextInt() scanner.nextInt scanner scanner.close() scanner.close scanner int max = 0; max 0 int count1 = 0; count1 0 for (int i = 0; i < N; i++) {
            count1 += A1.get(i);
            int count2 = count1;
            for (int j = i; j < N; j++) {
                count2 += A2.get(j);
            }
            if (max < count2) {
                max = count2;
            }

        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            count1 += A1.get(i);
            int count2 = count1;
            for (int j = i; j < N; j++) {
                count2 += A2.get(j);
            }
            if (max < count2) {
                max = count2;
            }

        } {
            count1 += A1.get(i);
            int count2 = count1;
            for (int j = i; j < N; j++) {
                count2 += A2.get(j);
            }
            if (max < count2) {
                max = count2;
            }

        } count1 += A1.get(i) count1 A1.get(i) A1.get A1 i int count2 = count1; count2 count1 for (int j = i; j < N; j++) {
                count2 += A2.get(j);
            } int j = i; int j = i; j i j < N j N j++ j++ j {
                count2 += A2.get(j);
            } {
                count2 += A2.get(j);
            } count2 += A2.get(j) count2 A2.get(j) A2.get A2 j if (max < count2) {
                max = count2;
            } max < count2 max count2 {
                max = count2;
            } max = count2 max count2 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 scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        ArrayList<Integer> A1 = new ArrayList<>();
        ArrayList<Integer> A2 = new ArrayList<>();
        for (int i = 0; i < N; i++) {
            A1.add(scanner.nextInt());
        }
        for (int i = 0; i < N; i++) {
            A2.add(scanner.nextInt());
        }
        scanner.close();

        int max = 0;
        int count1 = 0;
        for (int i = 0; i < N; i++) {
            count1 += A1.get(i);
            int count2 = count1;
            for (int j = i; j < N; j++) {
                count2 += A2.get(j);
            }
            if (max < count2) {
                max = count2;
            }

        }

        System.out.println(max);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        ArrayList<Integer> A1 = new ArrayList<>();
        ArrayList<Integer> A2 = new ArrayList<>();
        for (int i = 0; i < N; i++) {
            A1.add(scanner.nextInt());
        }
        for (int i = 0; i < N; i++) {
            A2.add(scanner.nextInt());
        }
        scanner.close();

        int max = 0;
        int count1 = 0;
        for (int i = 0; i < N; i++) {
            count1 += A1.get(i);
            int count2 = count1;
            for (int j = i; j < N; j++) {
                count2 += A2.get(j);
            }
            if (max < count2) {
                max = count2;
            }

        }

        System.out.println(max);
    }
} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        ArrayList<Integer> A1 = new ArrayList<>();
        ArrayList<Integer> A2 = new ArrayList<>();
        for (int i = 0; i < N; i++) {
            A1.add(scanner.nextInt());
        }
        for (int i = 0; i < N; i++) {
            A2.add(scanner.nextInt());
        }
        scanner.close();

        int max = 0;
        int count1 = 0;
        for (int i = 0; i < N; i++) {
            count1 += A1.get(i);
            int count2 = count1;
            for (int j = i; j < N; j++) {
                count2 += A2.get(j);
            }
            if (max < count2) {
                max = count2;
            }

        }

        System.out.println(max);
    }
}