import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int A[][] = new int[2][N];
        long ans = 0;
        int tmp=0;
        long result0 = 0;
        long result1 = 0;
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                A[i][j] = sc.nextInt();
            }
        }
            for(int i=0;i<N;i++){
                int j=0;
                tmp=0;
                while(j<=i){
                  tmp+=A[0][j];
                  j++;
                }
                int k=i;
                while(k<N){
                    tmp+=A[1][k];
                    k++;
                    
                }
                    ans=Math.max(ans,tmp);
                }
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner 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[2][N];
        long ans = 0;
        int tmp=0;
        long result0 = 0;
        long result1 = 0;
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                A[i][j] = sc.nextInt();
            }
        }
            for(int i=0;i<N;i++){
                int j=0;
                tmp=0;
                while(j<=i){
                  tmp+=A[0][j];
                  j++;
                }
                int k=i;
                while(k<N){
                    tmp+=A[1][k];
                    k++;
                    
                }
                    ans=Math.max(ans,tmp);
                }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int A[][] = new int[2][N];
        long ans = 0;
        int tmp=0;
        long result0 = 0;
        long result1 = 0;
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                A[i][j] = sc.nextInt();
            }
        }
            for(int i=0;i<N;i++){
                int j=0;
                tmp=0;
                while(j<=i){
                  tmp+=A[0][j];
                  j++;
                }
                int k=i;
                while(k<N){
                    tmp+=A[1][k];
                    k++;
                    
                }
                    ans=Math.max(ans,tmp);
                }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int A[][] = new int[2][N];
        long ans = 0;
        int tmp=0;
        long result0 = 0;
        long result1 = 0;
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                A[i][j] = sc.nextInt();
            }
        }
            for(int i=0;i<N;i++){
                int j=0;
                tmp=0;
                while(j<=i){
                  tmp+=A[0][j];
                  j++;
                }
                int k=i;
                while(k<N){
                    tmp+=A[1][k];
                    k++;
                    
                }
                    ans=Math.max(ans,tmp);
                }
        System.out.println(ans);
    } 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[2][N]; A new int[2][N] 2 N long ans = 0; ans 0 int tmp=0; tmp 0 long result0 = 0; result0 0 long result1 = 0; result1 0 for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                A[i][j] = sc.nextInt();
            }
        } int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
            for (int j = 0; j < N; j++) {
                A[i][j] = sc.nextInt();
            }
        } {
            for (int j = 0; j < N; j++) {
                A[i][j] = sc.nextInt();
            }
        } for (int j = 0; j < N; j++) {
                A[i][j] = sc.nextInt();
            } int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
                A[i][j] = sc.nextInt();
            } {
                A[i][j] = sc.nextInt();
            } A[i][j] = sc.nextInt() A[i][j] A[i] A i j sc.nextInt() sc.nextInt sc for(int i=0;i<N;i++){
                int j=0;
                tmp=0;
                while(j<=i){
                  tmp+=A[0][j];
                  j++;
                }
                int k=i;
                while(k<N){
                    tmp+=A[1][k];
                    k++;
                    
                }
                    ans=Math.max(ans,tmp);
                } int i=0; int i=0; i 0 i<N i N i++ i++ i {
                int j=0;
                tmp=0;
                while(j<=i){
                  tmp+=A[0][j];
                  j++;
                }
                int k=i;
                while(k<N){
                    tmp+=A[1][k];
                    k++;
                    
                }
                    ans=Math.max(ans,tmp);
                } {
                int j=0;
                tmp=0;
                while(j<=i){
                  tmp+=A[0][j];
                  j++;
                }
                int k=i;
                while(k<N){
                    tmp+=A[1][k];
                    k++;
                    
                }
                    ans=Math.max(ans,tmp);
                } int j=0; j 0 tmp=0 tmp 0 while(j<=i){
                  tmp+=A[0][j];
                  j++;
                } j<=i j i {
                  tmp+=A[0][j];
                  j++;
                } tmp+=A[0][j] tmp A[0][j] A[0] A 0 j j++ j int k=i; k i while(k<N){
                    tmp+=A[1][k];
                    k++;
                    
                } k<N k N {
                    tmp+=A[1][k];
                    k++;
                    
                } tmp+=A[1][k] tmp A[1][k] A[1] A 1 k k++ k ans=Math.max(ans,tmp) ans Math.max(ans,tmp) Math.max Math ans tmp System.out.println(ans) System.out.println System.out System System.out ans 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[2][N];
        long ans = 0;
        int tmp=0;
        long result0 = 0;
        long result1 = 0;
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                A[i][j] = sc.nextInt();
            }
        }
            for(int i=0;i<N;i++){
                int j=0;
                tmp=0;
                while(j<=i){
                  tmp+=A[0][j];
                  j++;
                }
                int k=i;
                while(k<N){
                    tmp+=A[1][k];
                    k++;
                    
                }
                    ans=Math.max(ans,tmp);
                }
        System.out.println(ans);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int A[][] = new int[2][N];
        long ans = 0;
        int tmp=0;
        long result0 = 0;
        long result1 = 0;
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                A[i][j] = sc.nextInt();
            }
        }
            for(int i=0;i<N;i++){
                int j=0;
                tmp=0;
                while(j<=i){
                  tmp+=A[0][j];
                  j++;
                }
                int k=i;
                while(k<N){
                    tmp+=A[1][k];
                    k++;
                    
                }
                    ans=Math.max(ans,tmp);
                }
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int A[][] = new int[2][N];
        long ans = 0;
        int tmp=0;
        long result0 = 0;
        long result1 = 0;
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < N; j++) {
                A[i][j] = sc.nextInt();
            }
        }
            for(int i=0;i<N;i++){
                int j=0;
                tmp=0;
                while(j<=i){
                  tmp+=A[0][j];
                  j++;
                }
                int k=i;
                while(k<N){
                    tmp+=A[1][k];
                    k++;
                    
                }
                    ans=Math.max(ans,tmp);
                }
        System.out.println(ans);
    }
}