import java.util.*;

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 = 0;
        int max = 0;
        int x = 0;
        for(int i=0; i<N; i++){
            for(int j=0; j<N; j++){
                sum += A[x][j];
                if(j==i && x==0){
                    x += 1;
                    j -= 1;
                }
            }
            max = Math.max(max, sum);
            sum = 0;
            x = 0;
        }
        System.out.println(max);
    }
} import java.util.*; util.* java 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 = 0;
        int max = 0;
        int x = 0;
        for(int i=0; i<N; i++){
            for(int j=0; j<N; j++){
                sum += A[x][j];
                if(j==i && x==0){
                    x += 1;
                    j -= 1;
                }
            }
            max = Math.max(max, sum);
            sum = 0;
            x = 0;
        }
        System.out.println(max);
    }
} 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 = 0;
        int max = 0;
        int x = 0;
        for(int i=0; i<N; i++){
            for(int j=0; j<N; j++){
                sum += A[x][j];
                if(j==i && x==0){
                    x += 1;
                    j -= 1;
                }
            }
            max = Math.max(max, sum);
            sum = 0;
            x = 0;
        }
        System.out.println(max);
    } 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 = 0;
        int max = 0;
        int x = 0;
        for(int i=0; i<N; i++){
            for(int j=0; j<N; j++){
                sum += A[x][j];
                if(j==i && x==0){
                    x += 1;
                    j -= 1;
                }
            }
            max = Math.max(max, sum);
            sum = 0;
            x = 0;
        }
        System.out.println(max);
    } 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 = 0; sum 0 int max = 0; max 0 int x = 0; x 0 for(int i=0; i<N; i++){
            for(int j=0; j<N; j++){
                sum += A[x][j];
                if(j==i && x==0){
                    x += 1;
                    j -= 1;
                }
            }
            max = Math.max(max, sum);
            sum = 0;
            x = 0;
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            for(int j=0; j<N; j++){
                sum += A[x][j];
                if(j==i && x==0){
                    x += 1;
                    j -= 1;
                }
            }
            max = Math.max(max, sum);
            sum = 0;
            x = 0;
        } {
            for(int j=0; j<N; j++){
                sum += A[x][j];
                if(j==i && x==0){
                    x += 1;
                    j -= 1;
                }
            }
            max = Math.max(max, sum);
            sum = 0;
            x = 0;
        } for(int j=0; j<N; j++){
                sum += A[x][j];
                if(j==i && x==0){
                    x += 1;
                    j -= 1;
                }
            } int j=0; int j=0; j 0 j<N j N j++ j++ j {
                sum += A[x][j];
                if(j==i && x==0){
                    x += 1;
                    j -= 1;
                }
            } {
                sum += A[x][j];
                if(j==i && x==0){
                    x += 1;
                    j -= 1;
                }
            } sum += A[x][j] sum A[x][j] A[x] A x j if(j==i && x==0){
                    x += 1;
                    j -= 1;
                } j==i && x==0 j==i j i x==0 x 0 {
                    x += 1;
                    j -= 1;
                } x += 1 x 1 j -= 1 j 1 max = Math.max(max, sum) max Math.max(max, sum) Math.max Math max sum sum = 0 sum 0 x = 0 x 0 System.out.println(max) System.out.println System.out System System.out max String[] args args
import java.util.*;

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 = 0;
        int max = 0;
        int x = 0;
        for(int i=0; i<N; i++){
            for(int j=0; j<N; j++){
                sum += A[x][j];
                if(j==i && x==0){
                    x += 1;
                    j -= 1;
                }
            }
            max = Math.max(max, sum);
            sum = 0;
            x = 0;
        }
        System.out.println(max);
    }
}