import java.util.*;

public class Main {


    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.nextLine());
        int[][] targetMap;
        int prevValue = 0;
        int max = Integer.MIN_VALUE;
        int ans = 0;

        targetMap = new int[4][N+2];

        String[] line = sc.nextLine().split(" ");

        for(int i = 0; i < N;i++){
            targetMap[1][i+1] = Integer.parseInt(line[i]);
        }

        line = sc.nextLine().split(" ");

        for(int i = 0; i < N;i++){
            targetMap[2][i+1] = Integer.parseInt(line[i]);
        }
        
        int indexX = 1;
        while(indexX <= N){

            for(int x = 1;x <= indexX;x++){
                ans += targetMap[1][x];
            }

            for(int nextX = indexX;nextX <= N;nextX++){
                ans += targetMap[2][nextX];
            }

            if (ans > max){
                max = ans;
            }

            ans = 0;
            indexX++;
        }

        System.out.println(max);
    }

 } import java.util.*; util.* java public class Main {


    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.nextLine());
        int[][] targetMap;
        int prevValue = 0;
        int max = Integer.MIN_VALUE;
        int ans = 0;

        targetMap = new int[4][N+2];

        String[] line = sc.nextLine().split(" ");

        for(int i = 0; i < N;i++){
            targetMap[1][i+1] = Integer.parseInt(line[i]);
        }

        line = sc.nextLine().split(" ");

        for(int i = 0; i < N;i++){
            targetMap[2][i+1] = Integer.parseInt(line[i]);
        }
        
        int indexX = 1;
        while(indexX <= N){

            for(int x = 1;x <= indexX;x++){
                ans += targetMap[1][x];
            }

            for(int nextX = indexX;nextX <= N;nextX++){
                ans += targetMap[2][nextX];
            }

            if (ans > max){
                max = ans;
            }

            ans = 0;
            indexX++;
        }

        System.out.println(max);
    }

 } Main public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.nextLine());
        int[][] targetMap;
        int prevValue = 0;
        int max = Integer.MIN_VALUE;
        int ans = 0;

        targetMap = new int[4][N+2];

        String[] line = sc.nextLine().split(" ");

        for(int i = 0; i < N;i++){
            targetMap[1][i+1] = Integer.parseInt(line[i]);
        }

        line = sc.nextLine().split(" ");

        for(int i = 0; i < N;i++){
            targetMap[2][i+1] = Integer.parseInt(line[i]);
        }
        
        int indexX = 1;
        while(indexX <= N){

            for(int x = 1;x <= indexX;x++){
                ans += targetMap[1][x];
            }

            for(int nextX = indexX;nextX <= N;nextX++){
                ans += targetMap[2][nextX];
            }

            if (ans > max){
                max = ans;
            }

            ans = 0;
            indexX++;
        }

        System.out.println(max);
    } main {

        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.nextLine());
        int[][] targetMap;
        int prevValue = 0;
        int max = Integer.MIN_VALUE;
        int ans = 0;

        targetMap = new int[4][N+2];

        String[] line = sc.nextLine().split(" ");

        for(int i = 0; i < N;i++){
            targetMap[1][i+1] = Integer.parseInt(line[i]);
        }

        line = sc.nextLine().split(" ");

        for(int i = 0; i < N;i++){
            targetMap[2][i+1] = Integer.parseInt(line[i]);
        }
        
        int indexX = 1;
        while(indexX <= N){

            for(int x = 1;x <= indexX;x++){
                ans += targetMap[1][x];
            }

            for(int nextX = indexX;nextX <= N;nextX++){
                ans += targetMap[2][nextX];
            }

            if (ans > max){
                max = ans;
            }

            ans = 0;
            indexX++;
        }

        System.out.println(max);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.nextLine()); N Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc int[][] targetMap; targetMap int prevValue = 0; prevValue 0 int max = Integer.MIN_VALUE; max Integer.MIN_VALUE Integer Integer.MIN_VALUE int ans = 0; ans 0 targetMap = new int[4][N+2] targetMap new int[4][N+2] 4 N+2 N 2 String[] line = sc.nextLine().split(" "); line sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " for(int i = 0; i < N;i++){
            targetMap[1][i+1] = Integer.parseInt(line[i]);
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            targetMap[1][i+1] = Integer.parseInt(line[i]);
        } {
            targetMap[1][i+1] = Integer.parseInt(line[i]);
        } targetMap[1][i+1] = Integer.parseInt(line[i]) targetMap[1][i+1] targetMap[1] targetMap 1 i+1 i 1 Integer.parseInt(line[i]) Integer.parseInt Integer line[i] line i line = sc.nextLine().split(" ") line sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " for(int i = 0; i < N;i++){
            targetMap[2][i+1] = Integer.parseInt(line[i]);
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            targetMap[2][i+1] = Integer.parseInt(line[i]);
        } {
            targetMap[2][i+1] = Integer.parseInt(line[i]);
        } targetMap[2][i+1] = Integer.parseInt(line[i]) targetMap[2][i+1] targetMap[2] targetMap 2 i+1 i 1 Integer.parseInt(line[i]) Integer.parseInt Integer line[i] line i int indexX = 1; indexX 1 while(indexX <= N){

            for(int x = 1;x <= indexX;x++){
                ans += targetMap[1][x];
            }

            for(int nextX = indexX;nextX <= N;nextX++){
                ans += targetMap[2][nextX];
            }

            if (ans > max){
                max = ans;
            }

            ans = 0;
            indexX++;
        } indexX <= N indexX N {

            for(int x = 1;x <= indexX;x++){
                ans += targetMap[1][x];
            }

            for(int nextX = indexX;nextX <= N;nextX++){
                ans += targetMap[2][nextX];
            }

            if (ans > max){
                max = ans;
            }

            ans = 0;
            indexX++;
        } for(int x = 1;x <= indexX;x++){
                ans += targetMap[1][x];
            } int x = 1; int x = 1; x 1 x <= indexX x indexX x++ x++ x {
                ans += targetMap[1][x];
            } {
                ans += targetMap[1][x];
            } ans += targetMap[1][x] ans targetMap[1][x] targetMap[1] targetMap 1 x for(int nextX = indexX;nextX <= N;nextX++){
                ans += targetMap[2][nextX];
            } int nextX = indexX; int nextX = indexX; nextX indexX nextX <= N nextX N nextX++ nextX++ nextX {
                ans += targetMap[2][nextX];
            } {
                ans += targetMap[2][nextX];
            } ans += targetMap[2][nextX] ans targetMap[2][nextX] targetMap[2] targetMap 2 nextX if (ans > max){
                max = ans;
            } ans > max ans max {
                max = ans;
            } max = ans max ans ans = 0 ans 0 indexX++ indexX 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 = Integer.parseInt(sc.nextLine());
        int[][] targetMap;
        int prevValue = 0;
        int max = Integer.MIN_VALUE;
        int ans = 0;

        targetMap = new int[4][N+2];

        String[] line = sc.nextLine().split(" ");

        for(int i = 0; i < N;i++){
            targetMap[1][i+1] = Integer.parseInt(line[i]);
        }

        line = sc.nextLine().split(" ");

        for(int i = 0; i < N;i++){
            targetMap[2][i+1] = Integer.parseInt(line[i]);
        }
        
        int indexX = 1;
        while(indexX <= N){

            for(int x = 1;x <= indexX;x++){
                ans += targetMap[1][x];
            }

            for(int nextX = indexX;nextX <= N;nextX++){
                ans += targetMap[2][nextX];
            }

            if (ans > max){
                max = ans;
            }

            ans = 0;
            indexX++;
        }

        System.out.println(max);
    }

 } public class Main {


    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.nextLine());
        int[][] targetMap;
        int prevValue = 0;
        int max = Integer.MIN_VALUE;
        int ans = 0;

        targetMap = new int[4][N+2];

        String[] line = sc.nextLine().split(" ");

        for(int i = 0; i < N;i++){
            targetMap[1][i+1] = Integer.parseInt(line[i]);
        }

        line = sc.nextLine().split(" ");

        for(int i = 0; i < N;i++){
            targetMap[2][i+1] = Integer.parseInt(line[i]);
        }
        
        int indexX = 1;
        while(indexX <= N){

            for(int x = 1;x <= indexX;x++){
                ans += targetMap[1][x];
            }

            for(int nextX = indexX;nextX <= N;nextX++){
                ans += targetMap[2][nextX];
            }

            if (ans > max){
                max = ans;
            }

            ans = 0;
            indexX++;
        }

        System.out.println(max);
    }

 } Main
import java.util.*;

public class Main {


    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.nextLine());
        int[][] targetMap;
        int prevValue = 0;
        int max = Integer.MIN_VALUE;
        int ans = 0;

        targetMap = new int[4][N+2];

        String[] line = sc.nextLine().split(" ");

        for(int i = 0; i < N;i++){
            targetMap[1][i+1] = Integer.parseInt(line[i]);
        }

        line = sc.nextLine().split(" ");

        for(int i = 0; i < N;i++){
            targetMap[2][i+1] = Integer.parseInt(line[i]);
        }
        
        int indexX = 1;
        while(indexX <= N){

            for(int x = 1;x <= indexX;x++){
                ans += targetMap[1][x];
            }

            for(int nextX = indexX;nextX <= N;nextX++){
                ans += targetMap[2][nextX];
            }

            if (ans > max){
                max = ans;
            }

            ans = 0;
            indexX++;
        }

        System.out.println(max);
    }

 }
