import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int [][] ab = new int[2][N];
        for(int i=0; i<2;i++){
            for(int j=0; j<N;j++){
                ab[i][j] = in.nextInt();
            }
        }
        int [] dif = new int[N];
        int index =0;
        for(int i =1; i<=N;i++){
            for(int j=0; j<=N-i;j++){
                dif[index]+=ab[0][j];
            }
            for(int j=N-1;j>=N-i;j--){
                dif[index]+=ab[1][j];
            }
            index++;
        }
        int max = dif[0];
        for(int i: dif){
            if(i>max){
                max = i;
            }
        }
        System.out.println(max);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int [][] ab = new int[2][N];
        for(int i=0; i<2;i++){
            for(int j=0; j<N;j++){
                ab[i][j] = in.nextInt();
            }
        }
        int [] dif = new int[N];
        int index =0;
        for(int i =1; i<=N;i++){
            for(int j=0; j<=N-i;j++){
                dif[index]+=ab[0][j];
            }
            for(int j=N-1;j>=N-i;j--){
                dif[index]+=ab[1][j];
            }
            index++;
        }
        int max = dif[0];
        for(int i: dif){
            if(i>max){
                max = i;
            }
        }
        System.out.println(max);
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int [][] ab = new int[2][N];
        for(int i=0; i<2;i++){
            for(int j=0; j<N;j++){
                ab[i][j] = in.nextInt();
            }
        }
        int [] dif = new int[N];
        int index =0;
        for(int i =1; i<=N;i++){
            for(int j=0; j<=N-i;j++){
                dif[index]+=ab[0][j];
            }
            for(int j=N-1;j>=N-i;j--){
                dif[index]+=ab[1][j];
            }
            index++;
        }
        int max = dif[0];
        for(int i: dif){
            if(i>max){
                max = i;
            }
        }
        System.out.println(max);
    } main {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int [][] ab = new int[2][N];
        for(int i=0; i<2;i++){
            for(int j=0; j<N;j++){
                ab[i][j] = in.nextInt();
            }
        }
        int [] dif = new int[N];
        int index =0;
        for(int i =1; i<=N;i++){
            for(int j=0; j<=N-i;j++){
                dif[index]+=ab[0][j];
            }
            for(int j=N-1;j>=N-i;j--){
                dif[index]+=ab[1][j];
            }
            index++;
        }
        int max = dif[0];
        for(int i: dif){
            if(i>max){
                max = i;
            }
        }
        System.out.println(max);
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int N = in.nextInt(); N in.nextInt() in.nextInt in int [][] ab = new int[2][N]; ab new int[2][N] 2 N for(int i=0; i<2;i++){
            for(int j=0; j<N;j++){
                ab[i][j] = in.nextInt();
            }
        } int i=0; int i=0; i 0 i<2 i 2 i++ i++ i {
            for(int j=0; j<N;j++){
                ab[i][j] = in.nextInt();
            }
        } {
            for(int j=0; j<N;j++){
                ab[i][j] = in.nextInt();
            }
        } for(int j=0; j<N;j++){
                ab[i][j] = in.nextInt();
            } int j=0; int j=0; j 0 j<N j N j++ j++ j {
                ab[i][j] = in.nextInt();
            } {
                ab[i][j] = in.nextInt();
            } ab[i][j] = in.nextInt() ab[i][j] ab[i] ab i j in.nextInt() in.nextInt in int [] dif = new int[N]; dif new int[N] N int index =0; index 0 for(int i =1; i<=N;i++){
            for(int j=0; j<=N-i;j++){
                dif[index]+=ab[0][j];
            }
            for(int j=N-1;j>=N-i;j--){
                dif[index]+=ab[1][j];
            }
            index++;
        } int i =1; int i =1; i 1 i<=N i N i++ i++ i {
            for(int j=0; j<=N-i;j++){
                dif[index]+=ab[0][j];
            }
            for(int j=N-1;j>=N-i;j--){
                dif[index]+=ab[1][j];
            }
            index++;
        } {
            for(int j=0; j<=N-i;j++){
                dif[index]+=ab[0][j];
            }
            for(int j=N-1;j>=N-i;j--){
                dif[index]+=ab[1][j];
            }
            index++;
        } for(int j=0; j<=N-i;j++){
                dif[index]+=ab[0][j];
            } int j=0; int j=0; j 0 j<=N-i j N-i N i j++ j++ j {
                dif[index]+=ab[0][j];
            } {
                dif[index]+=ab[0][j];
            } dif[index]+=ab[0][j] dif[index] dif index ab[0][j] ab[0] ab 0 j for(int j=N-1;j>=N-i;j--){
                dif[index]+=ab[1][j];
            } int j=N-1; int j=N-1; j N-1 N 1 j>=N-i j N-i N i j-- j-- j {
                dif[index]+=ab[1][j];
            } {
                dif[index]+=ab[1][j];
            } dif[index]+=ab[1][j] dif[index] dif index ab[1][j] ab[1] ab 1 j index++ index int max = dif[0]; max dif[0] dif 0 for(int i: dif){
            if(i>max){
                max = i;
            }
        } int i dif {
            if(i>max){
                max = i;
            }
        } {
            if(i>max){
                max = i;
            }
        } if(i>max){
                max = i;
            } i>max i max {
                max = i;
            } max = i max i 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 in = new Scanner(System.in);
        int N = in.nextInt();
        int [][] ab = new int[2][N];
        for(int i=0; i<2;i++){
            for(int j=0; j<N;j++){
                ab[i][j] = in.nextInt();
            }
        }
        int [] dif = new int[N];
        int index =0;
        for(int i =1; i<=N;i++){
            for(int j=0; j<=N-i;j++){
                dif[index]+=ab[0][j];
            }
            for(int j=N-1;j>=N-i;j--){
                dif[index]+=ab[1][j];
            }
            index++;
        }
        int max = dif[0];
        for(int i: dif){
            if(i>max){
                max = i;
            }
        }
        System.out.println(max);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int [][] ab = new int[2][N];
        for(int i=0; i<2;i++){
            for(int j=0; j<N;j++){
                ab[i][j] = in.nextInt();
            }
        }
        int [] dif = new int[N];
        int index =0;
        for(int i =1; i<=N;i++){
            for(int j=0; j<=N-i;j++){
                dif[index]+=ab[0][j];
            }
            for(int j=N-1;j>=N-i;j--){
                dif[index]+=ab[1][j];
            }
            index++;
        }
        int max = dif[0];
        for(int i: dif){
            if(i>max){
                max = i;
            }
        }
        System.out.println(max);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int [][] ab = new int[2][N];
        for(int i=0; i<2;i++){
            for(int j=0; j<N;j++){
                ab[i][j] = in.nextInt();
            }
        }
        int [] dif = new int[N];
        int index =0;
        for(int i =1; i<=N;i++){
            for(int j=0; j<=N-i;j++){
                dif[index]+=ab[0][j];
            }
            for(int j=N-1;j>=N-i;j--){
                dif[index]+=ab[1][j];
            }
            index++;
        }
        int max = dif[0];
        for(int i: dif){
            if(i>max){
                max = i;
            }
        }
        System.out.println(max);
    }
}
