import java.util.*;
import java.util.stream.IntStream;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] A1 = new int[N];
        int[] A2 = new int[N];
        int[] count = new int[N];
        for (int i = 0; i < N ; i++) {
            A1[i] = sc.nextInt();
            if(i >=1){
                A1[i] += A1[i-1];
            }
        }

        for (int j = 0; j < N ; j++) {
            A2[j] = sc.nextInt();
        }

        for (int j = N-2; j >=0 ; j--) {
            A2[j]+=A2[j+1];
        }

        for (int i = 0; i < N ; i++) {
            count[i] = A1[i] + A2[i];
        }
        System.out.println( IntStream.of(count).max().getAsInt());
    }
} import java.util.*; util.* java import java.util.stream.IntStream; IntStream java.util.stream public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] A1 = new int[N];
        int[] A2 = new int[N];
        int[] count = new int[N];
        for (int i = 0; i < N ; i++) {
            A1[i] = sc.nextInt();
            if(i >=1){
                A1[i] += A1[i-1];
            }
        }

        for (int j = 0; j < N ; j++) {
            A2[j] = sc.nextInt();
        }

        for (int j = N-2; j >=0 ; j--) {
            A2[j]+=A2[j+1];
        }

        for (int i = 0; i < N ; i++) {
            count[i] = A1[i] + A2[i];
        }
        System.out.println( IntStream.of(count).max().getAsInt());
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] A1 = new int[N];
        int[] A2 = new int[N];
        int[] count = new int[N];
        for (int i = 0; i < N ; i++) {
            A1[i] = sc.nextInt();
            if(i >=1){
                A1[i] += A1[i-1];
            }
        }

        for (int j = 0; j < N ; j++) {
            A2[j] = sc.nextInt();
        }

        for (int j = N-2; j >=0 ; j--) {
            A2[j]+=A2[j+1];
        }

        for (int i = 0; i < N ; i++) {
            count[i] = A1[i] + A2[i];
        }
        System.out.println( IntStream.of(count).max().getAsInt());
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] A1 = new int[N];
        int[] A2 = new int[N];
        int[] count = new int[N];
        for (int i = 0; i < N ; i++) {
            A1[i] = sc.nextInt();
            if(i >=1){
                A1[i] += A1[i-1];
            }
        }

        for (int j = 0; j < N ; j++) {
            A2[j] = sc.nextInt();
        }

        for (int j = N-2; j >=0 ; j--) {
            A2[j]+=A2[j+1];
        }

        for (int i = 0; i < N ; i++) {
            count[i] = A1[i] + A2[i];
        }
        System.out.println( IntStream.of(count).max().getAsInt());
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] A1 = new int[N]; A1 new int[N] N int[] A2 = new int[N]; A2 new int[N] N int[] count = new int[N]; count new int[N] N for (int i = 0; i < N ; i++) {
            A1[i] = sc.nextInt();
            if(i >=1){
                A1[i] += A1[i-1];
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            A1[i] = sc.nextInt();
            if(i >=1){
                A1[i] += A1[i-1];
            }
        } {
            A1[i] = sc.nextInt();
            if(i >=1){
                A1[i] += A1[i-1];
            }
        } A1[i] = sc.nextInt() A1[i] A1 i sc.nextInt() sc.nextInt sc if(i >=1){
                A1[i] += A1[i-1];
            } i >=1 i 1 {
                A1[i] += A1[i-1];
            } A1[i] += A1[i-1] A1[i] A1 i A1[i-1] A1 i-1 i 1 for (int j = 0; j < N ; j++) {
            A2[j] = sc.nextInt();
        } int j = 0; int j = 0; j 0 j < N j N j++ j++ j {
            A2[j] = sc.nextInt();
        } {
            A2[j] = sc.nextInt();
        } A2[j] = sc.nextInt() A2[j] A2 j sc.nextInt() sc.nextInt sc for (int j = N-2; j >=0 ; j--) {
            A2[j]+=A2[j+1];
        } int j = N-2; int j = N-2; j N-2 N 2 j >=0 j 0 j-- j-- j {
            A2[j]+=A2[j+1];
        } {
            A2[j]+=A2[j+1];
        } A2[j]+=A2[j+1] A2[j] A2 j A2[j+1] A2 j+1 j 1 for (int i = 0; i < N ; i++) {
            count[i] = A1[i] + A2[i];
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            count[i] = A1[i] + A2[i];
        } {
            count[i] = A1[i] + A2[i];
        } count[i] = A1[i] + A2[i] count[i] count i A1[i] + A2[i] A1[i] A1 i A2[i] A2 i System.out.println( IntStream.of(count).max().getAsInt()) System.out.println System.out System System.out IntStream.of(count).max().getAsInt() IntStream.of(count).max().getAsInt IntStream.of(count).max() IntStream.of(count).max IntStream.of(count) IntStream.of IntStream count String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] A1 = new int[N];
        int[] A2 = new int[N];
        int[] count = new int[N];
        for (int i = 0; i < N ; i++) {
            A1[i] = sc.nextInt();
            if(i >=1){
                A1[i] += A1[i-1];
            }
        }

        for (int j = 0; j < N ; j++) {
            A2[j] = sc.nextInt();
        }

        for (int j = N-2; j >=0 ; j--) {
            A2[j]+=A2[j+1];
        }

        for (int i = 0; i < N ; i++) {
            count[i] = A1[i] + A2[i];
        }
        System.out.println( IntStream.of(count).max().getAsInt());
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] A1 = new int[N];
        int[] A2 = new int[N];
        int[] count = new int[N];
        for (int i = 0; i < N ; i++) {
            A1[i] = sc.nextInt();
            if(i >=1){
                A1[i] += A1[i-1];
            }
        }

        for (int j = 0; j < N ; j++) {
            A2[j] = sc.nextInt();
        }

        for (int j = N-2; j >=0 ; j--) {
            A2[j]+=A2[j+1];
        }

        for (int i = 0; i < N ; i++) {
            count[i] = A1[i] + A2[i];
        }
        System.out.println( IntStream.of(count).max().getAsInt());
    }
} Main
import java.util.*;
import java.util.stream.IntStream;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] A1 = new int[N];
        int[] A2 = new int[N];
        int[] count = new int[N];
        for (int i = 0; i < N ; i++) {
            A1[i] = sc.nextInt();
            if(i >=1){
                A1[i] += A1[i-1];
            }
        }

        for (int j = 0; j < N ; j++) {
            A2[j] = sc.nextInt();
        }

        for (int j = N-2; j >=0 ; j--) {
            A2[j]+=A2[j+1];
        }

        for (int i = 0; i < N ; i++) {
            count[i] = A1[i] + A2[i];
        }
        System.out.println( IntStream.of(count).max().getAsInt());
    }
}