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

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        int[] b = new int[n];

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

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

        ArrayList<Integer> list = new ArrayList<>();
        int sumA = 0;
        int sumB = 0;
        for(int i=0; i<n; i++) {
            sumA += a[i];
            for(int j=i; j<n; j++) {
                sumB += b[j];
            }
            list.add(sumA+sumB);
            sumB = 0;
        }

        java.util.Collections.sort(list);
        System.out.println(list.get(list.size()-1));
    }
} import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        int[] b = new int[n];

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

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

        ArrayList<Integer> list = new ArrayList<>();
        int sumA = 0;
        int sumB = 0;
        for(int i=0; i<n; i++) {
            sumA += a[i];
            for(int j=i; j<n; j++) {
                sumB += b[j];
            }
            list.add(sumA+sumB);
            sumB = 0;
        }

        java.util.Collections.sort(list);
        System.out.println(list.get(list.size()-1));
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        int[] b = new int[n];

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

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

        ArrayList<Integer> list = new ArrayList<>();
        int sumA = 0;
        int sumB = 0;
        for(int i=0; i<n; i++) {
            sumA += a[i];
            for(int j=i; j<n; j++) {
                sumB += b[j];
            }
            list.add(sumA+sumB);
            sumB = 0;
        }

        java.util.Collections.sort(list);
        System.out.println(list.get(list.size()-1));
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        int[] b = new int[n];

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

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

        ArrayList<Integer> list = new ArrayList<>();
        int sumA = 0;
        int sumB = 0;
        for(int i=0; i<n; i++) {
            sumA += a[i];
            for(int j=i; j<n; j++) {
                sumB += b[j];
            }
            list.add(sumA+sumB);
            sumB = 0;
        }

        java.util.Collections.sort(list);
        System.out.println(list.get(list.size()-1));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] a = new int[n]; a new int[n] n int[] b = new int[n]; b new int[n] n for(int i=0; i<n; i++) {
            a[i] = sc.nextInt();
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            a[i] = sc.nextInt();
        } {
            a[i] = sc.nextInt();
        } a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc for(int i=0; i<n; i++) {
            b[i] = sc.nextInt();
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            b[i] = sc.nextInt();
        } {
            b[i] = sc.nextInt();
        } b[i] = sc.nextInt() b[i] b i sc.nextInt() sc.nextInt sc sc.close() sc.close sc ArrayList<Integer> list = new ArrayList<>(); list new ArrayList<>() int sumA = 0; sumA 0 int sumB = 0; sumB 0 for(int i=0; i<n; i++) {
            sumA += a[i];
            for(int j=i; j<n; j++) {
                sumB += b[j];
            }
            list.add(sumA+sumB);
            sumB = 0;
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            sumA += a[i];
            for(int j=i; j<n; j++) {
                sumB += b[j];
            }
            list.add(sumA+sumB);
            sumB = 0;
        } {
            sumA += a[i];
            for(int j=i; j<n; j++) {
                sumB += b[j];
            }
            list.add(sumA+sumB);
            sumB = 0;
        } sumA += a[i] sumA a[i] a i for(int j=i; j<n; j++) {
                sumB += b[j];
            } int j=i; int j=i; j i j<n j n j++ j++ j {
                sumB += b[j];
            } {
                sumB += b[j];
            } sumB += b[j] sumB b[j] b j list.add(sumA+sumB) list.add list sumA+sumB sumA sumB sumB = 0 sumB 0 java.util.Collections.sort(list) java.util.Collections.sort java.util.Collections java.util java java.util java.util.Collections list System.out.println(list.get(list.size()-1)) System.out.println System.out System System.out list.get(list.size()-1) list.get list list.size()-1 list.size() list.size list 1 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        int[] b = new int[n];

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

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

        ArrayList<Integer> list = new ArrayList<>();
        int sumA = 0;
        int sumB = 0;
        for(int i=0; i<n; i++) {
            sumA += a[i];
            for(int j=i; j<n; j++) {
                sumB += b[j];
            }
            list.add(sumA+sumB);
            sumB = 0;
        }

        java.util.Collections.sort(list);
        System.out.println(list.get(list.size()-1));
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        int[] b = new int[n];

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

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

        ArrayList<Integer> list = new ArrayList<>();
        int sumA = 0;
        int sumB = 0;
        for(int i=0; i<n; i++) {
            sumA += a[i];
            for(int j=i; j<n; j++) {
                sumB += b[j];
            }
            list.add(sumA+sumB);
            sumB = 0;
        }

        java.util.Collections.sort(list);
        System.out.println(list.get(list.size()-1));
    }
} Main
import java.util.Scanner;
import java.util.ArrayList;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        int[] b = new int[n];

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

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

        ArrayList<Integer> list = new ArrayList<>();
        int sumA = 0;
        int sumB = 0;
        for(int i=0; i<n; i++) {
            sumA += a[i];
            for(int j=i; j<n; j++) {
                sumB += b[j];
            }
            list.add(sumA+sumB);
            sumB = 0;
        }

        java.util.Collections.sort(list);
        System.out.println(list.get(list.size()-1));
    }
}
