import java.util.*;
import static java.lang.System.*;
import static java.lang.Math.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(in);
int n = sc.nextInt();
int[][] a=new int[2][n+1];
    for (int i = 0; i <2; i++) {
        for (int j = 1;j<=n; j++) {
            a[i][j]=a[i][j-1]+sc.nextInt();
        }
    }
    int ans=0;
    for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= n; j++) {
            ans=max(ans,a[0][i]+(a[1][n]-a[1][i-1]));
        }
    }
    out.println(ans);
}} import java.util.*; util.* java import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(in);
int n = sc.nextInt();
int[][] a=new int[2][n+1];
    for (int i = 0; i <2; i++) {
        for (int j = 1;j<=n; j++) {
            a[i][j]=a[i][j-1]+sc.nextInt();
        }
    }
    int ans=0;
    for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= n; j++) {
            ans=max(ans,a[0][i]+(a[1][n]-a[1][i-1]));
        }
    }
    out.println(ans);
}} Main public static void main(String[] args){
Scanner sc = new Scanner(in);
int n = sc.nextInt();
int[][] a=new int[2][n+1];
    for (int i = 0; i <2; i++) {
        for (int j = 1;j<=n; j++) {
            a[i][j]=a[i][j-1]+sc.nextInt();
        }
    }
    int ans=0;
    for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= n; j++) {
            ans=max(ans,a[0][i]+(a[1][n]-a[1][i-1]));
        }
    }
    out.println(ans);
} main {
Scanner sc = new Scanner(in);
int n = sc.nextInt();
int[][] a=new int[2][n+1];
    for (int i = 0; i <2; i++) {
        for (int j = 1;j<=n; j++) {
            a[i][j]=a[i][j-1]+sc.nextInt();
        }
    }
    int ans=0;
    for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= n; j++) {
            ans=max(ans,a[0][i]+(a[1][n]-a[1][i-1]));
        }
    }
    out.println(ans);
} Scanner sc = new Scanner(in); sc new Scanner(in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[][] a=new int[2][n+1]; a new int[2][n+1] 2 n+1 n 1 for (int i = 0; i <2; i++) {
        for (int j = 1;j<=n; j++) {
            a[i][j]=a[i][j-1]+sc.nextInt();
        }
    } int i = 0; int i = 0; i 0 i <2 i 2 i++ i++ i {
        for (int j = 1;j<=n; j++) {
            a[i][j]=a[i][j-1]+sc.nextInt();
        }
    } {
        for (int j = 1;j<=n; j++) {
            a[i][j]=a[i][j-1]+sc.nextInt();
        }
    } for (int j = 1;j<=n; j++) {
            a[i][j]=a[i][j-1]+sc.nextInt();
        } int j = 1; int j = 1; j 1 j<=n j n j++ j++ j {
            a[i][j]=a[i][j-1]+sc.nextInt();
        } {
            a[i][j]=a[i][j-1]+sc.nextInt();
        } a[i][j]=a[i][j-1]+sc.nextInt() a[i][j] a[i] a i j a[i][j-1]+sc.nextInt() a[i][j-1] a[i] a i j-1 j 1 sc.nextInt() sc.nextInt sc int ans=0; ans 0 for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= n; j++) {
            ans=max(ans,a[0][i]+(a[1][n]-a[1][i-1]));
        }
    } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
        for (int j = 1; j <= n; j++) {
            ans=max(ans,a[0][i]+(a[1][n]-a[1][i-1]));
        }
    } {
        for (int j = 1; j <= n; j++) {
            ans=max(ans,a[0][i]+(a[1][n]-a[1][i-1]));
        }
    } for (int j = 1; j <= n; j++) {
            ans=max(ans,a[0][i]+(a[1][n]-a[1][i-1]));
        } int j = 1; int j = 1; j 1 j <= n j n j++ j++ j {
            ans=max(ans,a[0][i]+(a[1][n]-a[1][i-1]));
        } {
            ans=max(ans,a[0][i]+(a[1][n]-a[1][i-1]));
        } ans=max(ans,a[0][i]+(a[1][n]-a[1][i-1])) ans max(ans,a[0][i]+(a[1][n]-a[1][i-1])) max ans a[0][i]+(a[1][n]-a[1][i-1]) a[0][i] a[0] a 0 i (a[1][n]-a[1][i-1]) a[1][n] a[1] a 1 n a[1][i-1] a[1] a 1 i-1 i 1 out.println(ans) out.println out ans String[] args args public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(in);
int n = sc.nextInt();
int[][] a=new int[2][n+1];
    for (int i = 0; i <2; i++) {
        for (int j = 1;j<=n; j++) {
            a[i][j]=a[i][j-1]+sc.nextInt();
        }
    }
    int ans=0;
    for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= n; j++) {
            ans=max(ans,a[0][i]+(a[1][n]-a[1][i-1]));
        }
    }
    out.println(ans);
}} public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(in);
int n = sc.nextInt();
int[][] a=new int[2][n+1];
    for (int i = 0; i <2; i++) {
        for (int j = 1;j<=n; j++) {
            a[i][j]=a[i][j-1]+sc.nextInt();
        }
    }
    int ans=0;
    for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= n; j++) {
            ans=max(ans,a[0][i]+(a[1][n]-a[1][i-1]));
        }
    }
    out.println(ans);
}} Main
import java.util.*;
import static java.lang.System.*;
import static java.lang.Math.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(in);
int n = sc.nextInt();
int[][] a=new int[2][n+1];
    for (int i = 0; i <2; i++) {
        for (int j = 1;j<=n; j++) {
            a[i][j]=a[i][j-1]+sc.nextInt();
        }
    }
    int ans=0;
    for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= n; j++) {
            ans=max(ans,a[0][i]+(a[1][n]-a[1][i-1]));
        }
    }
    out.println(ans);
}}