import java.util.Scanner;
import java.util.Arrays;
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];
        for(int i = 0;i < 2;i++){
            for(int j = 0; j < N;j++){
                a[i][j] = sc.nextInt();
            }
        }
        int[] sum = new int[N];
        for(int i = 0;i < N;i++){
            int l = 0;
            while(l <= i){
                sum[i] += a[0][l];
                l++;
            }
            for(int j = i; j < N;j++){
                sum[i] += a[1][j];
            }
        }
        Arrays.sort(sum);
        System.out.println(sum[N-1]);
    }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays 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];
        for(int i = 0;i < 2;i++){
            for(int j = 0; j < N;j++){
                a[i][j] = sc.nextInt();
            }
        }
        int[] sum = new int[N];
        for(int i = 0;i < N;i++){
            int l = 0;
            while(l <= i){
                sum[i] += a[0][l];
                l++;
            }
            for(int j = i; j < N;j++){
                sum[i] += a[1][j];
            }
        }
        Arrays.sort(sum);
        System.out.println(sum[N-1]);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[][] a = new int[2][N];
        for(int i = 0;i < 2;i++){
            for(int j = 0; j < N;j++){
                a[i][j] = sc.nextInt();
            }
        }
        int[] sum = new int[N];
        for(int i = 0;i < N;i++){
            int l = 0;
            while(l <= i){
                sum[i] += a[0][l];
                l++;
            }
            for(int j = i; j < N;j++){
                sum[i] += a[1][j];
            }
        }
        Arrays.sort(sum);
        System.out.println(sum[N-1]);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[][] a = new int[2][N];
        for(int i = 0;i < 2;i++){
            for(int j = 0; j < N;j++){
                a[i][j] = sc.nextInt();
            }
        }
        int[] sum = new int[N];
        for(int i = 0;i < N;i++){
            int l = 0;
            while(l <= i){
                sum[i] += a[0][l];
                l++;
            }
            for(int j = i; j < N;j++){
                sum[i] += a[1][j];
            }
        }
        Arrays.sort(sum);
        System.out.println(sum[N-1]);
    } 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 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 int[] sum = new int[N]; sum new int[N] N for(int i = 0;i < N;i++){
            int l = 0;
            while(l <= i){
                sum[i] += a[0][l];
                l++;
            }
            for(int j = i; j < N;j++){
                sum[i] += a[1][j];
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            int l = 0;
            while(l <= i){
                sum[i] += a[0][l];
                l++;
            }
            for(int j = i; j < N;j++){
                sum[i] += a[1][j];
            }
        } {
            int l = 0;
            while(l <= i){
                sum[i] += a[0][l];
                l++;
            }
            for(int j = i; j < N;j++){
                sum[i] += a[1][j];
            }
        } int l = 0; l 0 while(l <= i){
                sum[i] += a[0][l];
                l++;
            } l <= i l i {
                sum[i] += a[0][l];
                l++;
            } sum[i] += a[0][l] sum[i] sum i a[0][l] a[0] a 0 l l++ l for(int j = i; j < N;j++){
                sum[i] += a[1][j];
            } int j = i; int j = i; j i j < N j N j++ j++ j {
                sum[i] += a[1][j];
            } {
                sum[i] += a[1][j];
            } sum[i] += a[1][j] sum[i] sum i a[1][j] a[1] a 1 j Arrays.sort(sum) Arrays.sort Arrays sum System.out.println(sum[N-1]) System.out.println System.out System System.out sum[N-1] sum N-1 N 1 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];
        for(int i = 0;i < 2;i++){
            for(int j = 0; j < N;j++){
                a[i][j] = sc.nextInt();
            }
        }
        int[] sum = new int[N];
        for(int i = 0;i < N;i++){
            int l = 0;
            while(l <= i){
                sum[i] += a[0][l];
                l++;
            }
            for(int j = i; j < N;j++){
                sum[i] += a[1][j];
            }
        }
        Arrays.sort(sum);
        System.out.println(sum[N-1]);
    }
} 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];
        for(int i = 0;i < 2;i++){
            for(int j = 0; j < N;j++){
                a[i][j] = sc.nextInt();
            }
        }
        int[] sum = new int[N];
        for(int i = 0;i < N;i++){
            int l = 0;
            while(l <= i){
                sum[i] += a[0][l];
                l++;
            }
            for(int j = i; j < N;j++){
                sum[i] += a[1][j];
            }
        }
        Arrays.sort(sum);
        System.out.println(sum[N-1]);
    }
} Main
import java.util.Scanner;
import java.util.Arrays;
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];
        for(int i = 0;i < 2;i++){
            for(int j = 0; j < N;j++){
                a[i][j] = sc.nextInt();
            }
        }
        int[] sum = new int[N];
        for(int i = 0;i < N;i++){
            int l = 0;
            while(l <= i){
                sum[i] += a[0][l];
                l++;
            }
            for(int j = i; j < N;j++){
                sum[i] += a[1][j];
            }
        }
        Arrays.sort(sum);
        System.out.println(sum[N-1]);
    }
}
