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

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];
        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();
        }

        List<Integer> result_list = new ArrayList<Integer>();
        int firstline_result = 0;
        for (int i=0; i < A1.length; i++) {
            firstline_result += A1[i];
            int tmp = firstline_result;
            for (int k=i; k < A2.length; k++) {
                tmp += A2[k];
            }
            result_list.add(tmp);
        }

        int max = result_list.get(0);
        for (int i = 1; i < result_list.size(); i++) {
            int v = result_list.get(i);
            if (v > max) {
                max = v;
            }
        }

        System.out.println(max);
    }
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner 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];
        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();
        }

        List<Integer> result_list = new ArrayList<Integer>();
        int firstline_result = 0;
        for (int i=0; i < A1.length; i++) {
            firstline_result += A1[i];
            int tmp = firstline_result;
            for (int k=i; k < A2.length; k++) {
                tmp += A2[k];
            }
            result_list.add(tmp);
        }

        int max = result_list.get(0);
        for (int i = 1; i < result_list.size(); i++) {
            int v = result_list.get(i);
            if (v > max) {
                max = v;
            }
        }

        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];
        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();
        }

        List<Integer> result_list = new ArrayList<Integer>();
        int firstline_result = 0;
        for (int i=0; i < A1.length; i++) {
            firstline_result += A1[i];
            int tmp = firstline_result;
            for (int k=i; k < A2.length; k++) {
                tmp += A2[k];
            }
            result_list.add(tmp);
        }

        int max = result_list.get(0);
        for (int i = 1; i < result_list.size(); i++) {
            int v = result_list.get(i);
            if (v > max) {
                max = v;
            }
        }

        System.out.println(max);
    } 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();
        }

        List<Integer> result_list = new ArrayList<Integer>();
        int firstline_result = 0;
        for (int i=0; i < A1.length; i++) {
            firstline_result += A1[i];
            int tmp = firstline_result;
            for (int k=i; k < A2.length; k++) {
                tmp += A2[k];
            }
            result_list.add(tmp);
        }

        int max = result_list.get(0);
        for (int i = 1; i < result_list.size(); i++) {
            int v = result_list.get(i);
            if (v > max) {
                max = v;
            }
        }

        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]; 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 List<Integer> result_list = new ArrayList<Integer>(); result_list new ArrayList<Integer>() int firstline_result = 0; firstline_result 0 for (int i=0; i < A1.length; i++) {
            firstline_result += A1[i];
            int tmp = firstline_result;
            for (int k=i; k < A2.length; k++) {
                tmp += A2[k];
            }
            result_list.add(tmp);
        } int i=0; int i=0; i 0 i < A1.length i A1.length A1 A1.length i++ i++ i {
            firstline_result += A1[i];
            int tmp = firstline_result;
            for (int k=i; k < A2.length; k++) {
                tmp += A2[k];
            }
            result_list.add(tmp);
        } {
            firstline_result += A1[i];
            int tmp = firstline_result;
            for (int k=i; k < A2.length; k++) {
                tmp += A2[k];
            }
            result_list.add(tmp);
        } firstline_result += A1[i] firstline_result A1[i] A1 i int tmp = firstline_result; tmp firstline_result for (int k=i; k < A2.length; k++) {
                tmp += A2[k];
            } int k=i; int k=i; k i k < A2.length k A2.length A2 A2.length k++ k++ k {
                tmp += A2[k];
            } {
                tmp += A2[k];
            } tmp += A2[k] tmp A2[k] A2 k result_list.add(tmp) result_list.add result_list tmp int max = result_list.get(0); max result_list.get(0) result_list.get result_list 0 for (int i = 1; i < result_list.size(); i++) {
            int v = result_list.get(i);
            if (v > max) {
                max = v;
            }
        } int i = 1; int i = 1; i 1 i < result_list.size() i result_list.size() result_list.size result_list i++ i++ i {
            int v = result_list.get(i);
            if (v > max) {
                max = v;
            }
        } {
            int v = result_list.get(i);
            if (v > max) {
                max = v;
            }
        } int v = result_list.get(i); v result_list.get(i) result_list.get result_list i if (v > max) {
                max = v;
            } v > max v max {
                max = v;
            } max = v max v 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];
        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();
        }

        List<Integer> result_list = new ArrayList<Integer>();
        int firstline_result = 0;
        for (int i=0; i < A1.length; i++) {
            firstline_result += A1[i];
            int tmp = firstline_result;
            for (int k=i; k < A2.length; k++) {
                tmp += A2[k];
            }
            result_list.add(tmp);
        }

        int max = result_list.get(0);
        for (int i = 1; i < result_list.size(); i++) {
            int v = result_list.get(i);
            if (v > max) {
                max = v;
            }
        }

        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];
        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();
        }

        List<Integer> result_list = new ArrayList<Integer>();
        int firstline_result = 0;
        for (int i=0; i < A1.length; i++) {
            firstline_result += A1[i];
            int tmp = firstline_result;
            for (int k=i; k < A2.length; k++) {
                tmp += A2[k];
            }
            result_list.add(tmp);
        }

        int max = result_list.get(0);
        for (int i = 1; i < result_list.size(); i++) {
            int v = result_list.get(i);
            if (v > max) {
                max = v;
            }
        }

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

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];
        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();
        }

        List<Integer> result_list = new ArrayList<Integer>();
        int firstline_result = 0;
        for (int i=0; i < A1.length; i++) {
            firstline_result += A1[i];
            int tmp = firstline_result;
            for (int k=i; k < A2.length; k++) {
                tmp += A2[k];
            }
            result_list.add(tmp);
        }

        int max = result_list.get(0);
        for (int i = 1; i < result_list.size(); i++) {
            int v = result_list.get(i);
            if (v > max) {
                max = v;
            }
        }

        System.out.println(max);
    }
}
