import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int[][] A = new int[2][N];

        for(int i = 0; i < 2; i++){
            for(int j = 0; j < N; j++){
                A[i][j] = in.nextInt();
            }
        }
        int max = 0;
        for(int i = 0; i < N; i++){
            for(int j = 0; j <= i; j++){
                int sum = 0;    
                for(int k = 0;k < N; k++){
                    if (k <= j){
                        sum += A[0][k];
                        if(k == j){
                            sum += A[1][k];
                        }
                    } else{
                        sum += A[1][k];
                    }
                }
                if (sum > max){

                    max = sum;
                }
            }
        }
        System.out.println(max);
        
        in.close();
    }
} import java.io.*; io.* java import java.util.*; util.* java import java.text.*; text.* java import java.math.*; math.* java import java.util.regex.*; regex.* java.util public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int[][] A = new int[2][N];

        for(int i = 0; i < 2; i++){
            for(int j = 0; j < N; j++){
                A[i][j] = in.nextInt();
            }
        }
        int max = 0;
        for(int i = 0; i < N; i++){
            for(int j = 0; j <= i; j++){
                int sum = 0;    
                for(int k = 0;k < N; k++){
                    if (k <= j){
                        sum += A[0][k];
                        if(k == j){
                            sum += A[1][k];
                        }
                    } else{
                        sum += A[1][k];
                    }
                }
                if (sum > max){

                    max = sum;
                }
            }
        }
        System.out.println(max);
        
        in.close();
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int[][] A = new int[2][N];

        for(int i = 0; i < 2; i++){
            for(int j = 0; j < N; j++){
                A[i][j] = in.nextInt();
            }
        }
        int max = 0;
        for(int i = 0; i < N; i++){
            for(int j = 0; j <= i; j++){
                int sum = 0;    
                for(int k = 0;k < N; k++){
                    if (k <= j){
                        sum += A[0][k];
                        if(k == j){
                            sum += A[1][k];
                        }
                    } else{
                        sum += A[1][k];
                    }
                }
                if (sum > max){

                    max = sum;
                }
            }
        }
        System.out.println(max);
        
        in.close();
    } main {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int[][] A = new int[2][N];

        for(int i = 0; i < 2; i++){
            for(int j = 0; j < N; j++){
                A[i][j] = in.nextInt();
            }
        }
        int max = 0;
        for(int i = 0; i < N; i++){
            for(int j = 0; j <= i; j++){
                int sum = 0;    
                for(int k = 0;k < N; k++){
                    if (k <= j){
                        sum += A[0][k];
                        if(k == j){
                            sum += A[1][k];
                        }
                    } else{
                        sum += A[1][k];
                    }
                }
                if (sum > max){

                    max = sum;
                }
            }
        }
        System.out.println(max);
        
        in.close();
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int N = in.nextInt(); N in.nextInt() in.nextInt in int[][] A = new int[2][N]; A new int[2][N] 2 N for(int i = 0; i < 2; i++){
            for(int j = 0; j < N; j++){
                A[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++){
                A[i][j] = in.nextInt();
            }
        } {
            for(int j = 0; j < N; j++){
                A[i][j] = in.nextInt();
            }
        } for(int j = 0; j < N; j++){
                A[i][j] = in.nextInt();
            } int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
                A[i][j] = in.nextInt();
            } {
                A[i][j] = in.nextInt();
            } A[i][j] = in.nextInt() A[i][j] A[i] A i j in.nextInt() in.nextInt in int max = 0; max 0 for(int i = 0; i < N; i++){
            for(int j = 0; j <= i; j++){
                int sum = 0;    
                for(int k = 0;k < N; k++){
                    if (k <= j){
                        sum += A[0][k];
                        if(k == j){
                            sum += A[1][k];
                        }
                    } else{
                        sum += A[1][k];
                    }
                }
                if (sum > max){

                    max = sum;
                }
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            for(int j = 0; j <= i; j++){
                int sum = 0;    
                for(int k = 0;k < N; k++){
                    if (k <= j){
                        sum += A[0][k];
                        if(k == j){
                            sum += A[1][k];
                        }
                    } else{
                        sum += A[1][k];
                    }
                }
                if (sum > max){

                    max = sum;
                }
            }
        } {
            for(int j = 0; j <= i; j++){
                int sum = 0;    
                for(int k = 0;k < N; k++){
                    if (k <= j){
                        sum += A[0][k];
                        if(k == j){
                            sum += A[1][k];
                        }
                    } else{
                        sum += A[1][k];
                    }
                }
                if (sum > max){

                    max = sum;
                }
            }
        } for(int j = 0; j <= i; j++){
                int sum = 0;    
                for(int k = 0;k < N; k++){
                    if (k <= j){
                        sum += A[0][k];
                        if(k == j){
                            sum += A[1][k];
                        }
                    } else{
                        sum += A[1][k];
                    }
                }
                if (sum > max){

                    max = sum;
                }
            } int j = 0; int j = 0; j 0 j <= i j i j++ j++ j {
                int sum = 0;    
                for(int k = 0;k < N; k++){
                    if (k <= j){
                        sum += A[0][k];
                        if(k == j){
                            sum += A[1][k];
                        }
                    } else{
                        sum += A[1][k];
                    }
                }
                if (sum > max){

                    max = sum;
                }
            } {
                int sum = 0;    
                for(int k = 0;k < N; k++){
                    if (k <= j){
                        sum += A[0][k];
                        if(k == j){
                            sum += A[1][k];
                        }
                    } else{
                        sum += A[1][k];
                    }
                }
                if (sum > max){

                    max = sum;
                }
            } int sum = 0; sum 0 for(int k = 0;k < N; k++){
                    if (k <= j){
                        sum += A[0][k];
                        if(k == j){
                            sum += A[1][k];
                        }
                    } else{
                        sum += A[1][k];
                    }
                } int k = 0; int k = 0; k 0 k < N k N k++ k++ k {
                    if (k <= j){
                        sum += A[0][k];
                        if(k == j){
                            sum += A[1][k];
                        }
                    } else{
                        sum += A[1][k];
                    }
                } {
                    if (k <= j){
                        sum += A[0][k];
                        if(k == j){
                            sum += A[1][k];
                        }
                    } else{
                        sum += A[1][k];
                    }
                } if (k <= j){
                        sum += A[0][k];
                        if(k == j){
                            sum += A[1][k];
                        }
                    } else{
                        sum += A[1][k];
                    } k <= j k j {
                        sum += A[0][k];
                        if(k == j){
                            sum += A[1][k];
                        }
                    } sum += A[0][k] sum A[0][k] A[0] A 0 k if(k == j){
                            sum += A[1][k];
                        } k == j k j {
                            sum += A[1][k];
                        } sum += A[1][k] sum A[1][k] A[1] A 1 k {
                        sum += A[1][k];
                    } sum += A[1][k] sum A[1][k] A[1] A 1 k if (sum > max){

                    max = sum;
                } sum > max sum max {

                    max = sum;
                } max = sum max sum System.out.println(max) System.out.println System.out System System.out max in.close() in.close in String[] args args public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int[][] A = new int[2][N];

        for(int i = 0; i < 2; i++){
            for(int j = 0; j < N; j++){
                A[i][j] = in.nextInt();
            }
        }
        int max = 0;
        for(int i = 0; i < N; i++){
            for(int j = 0; j <= i; j++){
                int sum = 0;    
                for(int k = 0;k < N; k++){
                    if (k <= j){
                        sum += A[0][k];
                        if(k == j){
                            sum += A[1][k];
                        }
                    } else{
                        sum += A[1][k];
                    }
                }
                if (sum > max){

                    max = sum;
                }
            }
        }
        System.out.println(max);
        
        in.close();
    }
} public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int[][] A = new int[2][N];

        for(int i = 0; i < 2; i++){
            for(int j = 0; j < N; j++){
                A[i][j] = in.nextInt();
            }
        }
        int max = 0;
        for(int i = 0; i < N; i++){
            for(int j = 0; j <= i; j++){
                int sum = 0;    
                for(int k = 0;k < N; k++){
                    if (k <= j){
                        sum += A[0][k];
                        if(k == j){
                            sum += A[1][k];
                        }
                    } else{
                        sum += A[1][k];
                    }
                }
                if (sum > max){

                    max = sum;
                }
            }
        }
        System.out.println(max);
        
        in.close();
    }
} Main
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int[][] A = new int[2][N];

        for(int i = 0; i < 2; i++){
            for(int j = 0; j < N; j++){
                A[i][j] = in.nextInt();
            }
        }
        int max = 0;
        for(int i = 0; i < N; i++){
            for(int j = 0; j <= i; j++){
                int sum = 0;    
                for(int k = 0;k < N; k++){
                    if (k <= j){
                        sum += A[0][k];
                        if(k == j){
                            sum += A[1][k];
                        }
                    } else{
                        sum += A[1][k];
                    }
                }
                if (sum > max){

                    max = sum;
                }
            }
        }
        System.out.println(max);
        
        in.close();
    }
}
