import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = scanner.nextInt();
            }
        }
        int msxSum=0;
        for(int i=0;i<n;i++){
            int total=0;
            for(int j=0;j<=i;j++){
                total+=a[0][j];
            }
            for(int k=i;k<n;k++){
                total+=a[1][k];
            }
            if(msxSum<=total){
                msxSum=total;
            }
        }
        System.out.println(msxSum);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = scanner.nextInt();
            }
        }
        int msxSum=0;
        for(int i=0;i<n;i++){
            int total=0;
            for(int j=0;j<=i;j++){
                total+=a[0][j];
            }
            for(int k=i;k<n;k++){
                total+=a[1][k];
            }
            if(msxSum<=total){
                msxSum=total;
            }
        }
        System.out.println(msxSum);
    }
} Main public static void main(String[] args) {
        // write your code here
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = scanner.nextInt();
            }
        }
        int msxSum=0;
        for(int i=0;i<n;i++){
            int total=0;
            for(int j=0;j<=i;j++){
                total+=a[0][j];
            }
            for(int k=i;k<n;k++){
                total+=a[1][k];
            }
            if(msxSum<=total){
                msxSum=total;
            }
        }
        System.out.println(msxSum);
    } main {
        // write your code here
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = scanner.nextInt();
            }
        }
        int msxSum=0;
        for(int i=0;i<n;i++){
            int total=0;
            for(int j=0;j<=i;j++){
                total+=a[0][j];
            }
            for(int k=i;k<n;k++){
                total+=a[1][k];
            }
            if(msxSum<=total){
                msxSum=total;
            }
        }
        System.out.println(msxSum);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner 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] = scanner.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] = scanner.nextInt();
            }
        } {
            for (int j = 0; j < n; j++) {
                a[i][j] = scanner.nextInt();
            }
        } for (int j = 0; j < n; j++) {
                a[i][j] = scanner.nextInt();
            } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
                a[i][j] = scanner.nextInt();
            } {
                a[i][j] = scanner.nextInt();
            } a[i][j] = scanner.nextInt() a[i][j] a[i] a i j scanner.nextInt() scanner.nextInt scanner int msxSum=0; msxSum 0 for(int i=0;i<n;i++){
            int total=0;
            for(int j=0;j<=i;j++){
                total+=a[0][j];
            }
            for(int k=i;k<n;k++){
                total+=a[1][k];
            }
            if(msxSum<=total){
                msxSum=total;
            }
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            int total=0;
            for(int j=0;j<=i;j++){
                total+=a[0][j];
            }
            for(int k=i;k<n;k++){
                total+=a[1][k];
            }
            if(msxSum<=total){
                msxSum=total;
            }
        } {
            int total=0;
            for(int j=0;j<=i;j++){
                total+=a[0][j];
            }
            for(int k=i;k<n;k++){
                total+=a[1][k];
            }
            if(msxSum<=total){
                msxSum=total;
            }
        } int total=0; total 0 for(int j=0;j<=i;j++){
                total+=a[0][j];
            } int j=0; int j=0; j 0 j<=i j i j++ j++ j {
                total+=a[0][j];
            } {
                total+=a[0][j];
            } total+=a[0][j] total a[0][j] a[0] a 0 j for(int k=i;k<n;k++){
                total+=a[1][k];
            } int k=i; int k=i; k i k<n k n k++ k++ k {
                total+=a[1][k];
            } {
                total+=a[1][k];
            } total+=a[1][k] total a[1][k] a[1] a 1 k if(msxSum<=total){
                msxSum=total;
            } msxSum<=total msxSum total {
                msxSum=total;
            } msxSum=total msxSum total System.out.println(msxSum) System.out.println System.out System System.out msxSum String[] args args public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = scanner.nextInt();
            }
        }
        int msxSum=0;
        for(int i=0;i<n;i++){
            int total=0;
            for(int j=0;j<=i;j++){
                total+=a[0][j];
            }
            for(int k=i;k<n;k++){
                total+=a[1][k];
            }
            if(msxSum<=total){
                msxSum=total;
            }
        }
        System.out.println(msxSum);
    }
} public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = scanner.nextInt();
            }
        }
        int msxSum=0;
        for(int i=0;i<n;i++){
            int total=0;
            for(int j=0;j<=i;j++){
                total+=a[0][j];
            }
            for(int k=i;k<n;k++){
                total+=a[1][k];
            }
            if(msxSum<=total){
                msxSum=total;
            }
        }
        System.out.println(msxSum);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[][] a = new int[2][n];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < n; j++) {
                a[i][j] = scanner.nextInt();
            }
        }
        int msxSum=0;
        for(int i=0;i<n;i++){
            int total=0;
            for(int j=0;j<=i;j++){
                total+=a[0][j];
            }
            for(int k=i;k<n;k++){
                total+=a[1][k];
            }
            if(msxSum<=total){
                msxSum=total;
            }
        }
        System.out.println(msxSum);
    }
}
