import java.util.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int wideLength = Integer.parseInt(sc.next());
        List<Integer> topList = new ArrayList<>();
        for(int x=1; x<= wideLength; x++) {
            topList.add(Integer.parseInt(sc.next()));
        }
        List<Integer> secondList = new ArrayList<>();
        for(int x=1; x<= wideLength; x++) {
            secondList.add(Integer.parseInt(sc.next()));
        }
        int res = 0;
        for(int x=1; x<= wideLength; x++) {
            int candy = 0;
            for(int y=1; y<=x; y++) {
                candy += topList.get(y-1);
            }
            for(int y=x; y<=wideLength; y++) {
                candy += secondList.get(y-1);
            }
            res = res>=candy?res:candy;
        }
        System.out.println(res);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int wideLength = Integer.parseInt(sc.next());
        List<Integer> topList = new ArrayList<>();
        for(int x=1; x<= wideLength; x++) {
            topList.add(Integer.parseInt(sc.next()));
        }
        List<Integer> secondList = new ArrayList<>();
        for(int x=1; x<= wideLength; x++) {
            secondList.add(Integer.parseInt(sc.next()));
        }
        int res = 0;
        for(int x=1; x<= wideLength; x++) {
            int candy = 0;
            for(int y=1; y<=x; y++) {
                candy += topList.get(y-1);
            }
            for(int y=x; y<=wideLength; y++) {
                candy += secondList.get(y-1);
            }
            res = res>=candy?res:candy;
        }
        System.out.println(res);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int wideLength = Integer.parseInt(sc.next());
        List<Integer> topList = new ArrayList<>();
        for(int x=1; x<= wideLength; x++) {
            topList.add(Integer.parseInt(sc.next()));
        }
        List<Integer> secondList = new ArrayList<>();
        for(int x=1; x<= wideLength; x++) {
            secondList.add(Integer.parseInt(sc.next()));
        }
        int res = 0;
        for(int x=1; x<= wideLength; x++) {
            int candy = 0;
            for(int y=1; y<=x; y++) {
                candy += topList.get(y-1);
            }
            for(int y=x; y<=wideLength; y++) {
                candy += secondList.get(y-1);
            }
            res = res>=candy?res:candy;
        }
        System.out.println(res);
    } main {
        Scanner sc = new Scanner(System.in);
        int wideLength = Integer.parseInt(sc.next());
        List<Integer> topList = new ArrayList<>();
        for(int x=1; x<= wideLength; x++) {
            topList.add(Integer.parseInt(sc.next()));
        }
        List<Integer> secondList = new ArrayList<>();
        for(int x=1; x<= wideLength; x++) {
            secondList.add(Integer.parseInt(sc.next()));
        }
        int res = 0;
        for(int x=1; x<= wideLength; x++) {
            int candy = 0;
            for(int y=1; y<=x; y++) {
                candy += topList.get(y-1);
            }
            for(int y=x; y<=wideLength; y++) {
                candy += secondList.get(y-1);
            }
            res = res>=candy?res:candy;
        }
        System.out.println(res);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int wideLength = Integer.parseInt(sc.next()); wideLength Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc List<Integer> topList = new ArrayList<>(); topList new ArrayList<>() for(int x=1; x<= wideLength; x++) {
            topList.add(Integer.parseInt(sc.next()));
        } int x=1; int x=1; x 1 x<= wideLength x wideLength x++ x++ x {
            topList.add(Integer.parseInt(sc.next()));
        } {
            topList.add(Integer.parseInt(sc.next()));
        } topList.add(Integer.parseInt(sc.next())) topList.add topList Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc List<Integer> secondList = new ArrayList<>(); secondList new ArrayList<>() for(int x=1; x<= wideLength; x++) {
            secondList.add(Integer.parseInt(sc.next()));
        } int x=1; int x=1; x 1 x<= wideLength x wideLength x++ x++ x {
            secondList.add(Integer.parseInt(sc.next()));
        } {
            secondList.add(Integer.parseInt(sc.next()));
        } secondList.add(Integer.parseInt(sc.next())) secondList.add secondList Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int res = 0; res 0 for(int x=1; x<= wideLength; x++) {
            int candy = 0;
            for(int y=1; y<=x; y++) {
                candy += topList.get(y-1);
            }
            for(int y=x; y<=wideLength; y++) {
                candy += secondList.get(y-1);
            }
            res = res>=candy?res:candy;
        } int x=1; int x=1; x 1 x<= wideLength x wideLength x++ x++ x {
            int candy = 0;
            for(int y=1; y<=x; y++) {
                candy += topList.get(y-1);
            }
            for(int y=x; y<=wideLength; y++) {
                candy += secondList.get(y-1);
            }
            res = res>=candy?res:candy;
        } {
            int candy = 0;
            for(int y=1; y<=x; y++) {
                candy += topList.get(y-1);
            }
            for(int y=x; y<=wideLength; y++) {
                candy += secondList.get(y-1);
            }
            res = res>=candy?res:candy;
        } int candy = 0; candy 0 for(int y=1; y<=x; y++) {
                candy += topList.get(y-1);
            } int y=1; int y=1; y 1 y<=x y x y++ y++ y {
                candy += topList.get(y-1);
            } {
                candy += topList.get(y-1);
            } candy += topList.get(y-1) candy topList.get(y-1) topList.get topList y-1 y 1 for(int y=x; y<=wideLength; y++) {
                candy += secondList.get(y-1);
            } int y=x; int y=x; y x y<=wideLength y wideLength y++ y++ y {
                candy += secondList.get(y-1);
            } {
                candy += secondList.get(y-1);
            } candy += secondList.get(y-1) candy secondList.get(y-1) secondList.get secondList y-1 y 1 res = res>=candy?res:candy res res>=candy?res:candy res>=candy res candy res candy System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int wideLength = Integer.parseInt(sc.next());
        List<Integer> topList = new ArrayList<>();
        for(int x=1; x<= wideLength; x++) {
            topList.add(Integer.parseInt(sc.next()));
        }
        List<Integer> secondList = new ArrayList<>();
        for(int x=1; x<= wideLength; x++) {
            secondList.add(Integer.parseInt(sc.next()));
        }
        int res = 0;
        for(int x=1; x<= wideLength; x++) {
            int candy = 0;
            for(int y=1; y<=x; y++) {
                candy += topList.get(y-1);
            }
            for(int y=x; y<=wideLength; y++) {
                candy += secondList.get(y-1);
            }
            res = res>=candy?res:candy;
        }
        System.out.println(res);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int wideLength = Integer.parseInt(sc.next());
        List<Integer> topList = new ArrayList<>();
        for(int x=1; x<= wideLength; x++) {
            topList.add(Integer.parseInt(sc.next()));
        }
        List<Integer> secondList = new ArrayList<>();
        for(int x=1; x<= wideLength; x++) {
            secondList.add(Integer.parseInt(sc.next()));
        }
        int res = 0;
        for(int x=1; x<= wideLength; x++) {
            int candy = 0;
            for(int y=1; y<=x; y++) {
                candy += topList.get(y-1);
            }
            for(int y=x; y<=wideLength; y++) {
                candy += secondList.get(y-1);
            }
            res = res>=candy?res:candy;
        }
        System.out.println(res);
    }
} Main
import java.util.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int wideLength = Integer.parseInt(sc.next());
        List<Integer> topList = new ArrayList<>();
        for(int x=1; x<= wideLength; x++) {
            topList.add(Integer.parseInt(sc.next()));
        }
        List<Integer> secondList = new ArrayList<>();
        for(int x=1; x<= wideLength; x++) {
            secondList.add(Integer.parseInt(sc.next()));
        }
        int res = 0;
        for(int x=1; x<= wideLength; x++) {
            int candy = 0;
            for(int y=1; y<=x; y++) {
                candy += topList.get(y-1);
            }
            for(int y=x; y<=wideLength; y++) {
                candy += secondList.get(y-1);
            }
            res = res>=candy?res:candy;
        }
        System.out.println(res);
    }
}