import java.util.Scanner;

class Main {
    private static int calcScore(int[][] a, int down) {

        int count = 0;
        for (int j = 0; j < a[0].length; j++) {
            if (j == down) {
                count += a[0][j];
                count += a[1][j];
            }else if( j < down){
                count += a[0][j];
            }else  if(j > down){
                count += a[1][j];               
            }
        }
        return count;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        sc.nextLine();
        String A1 = sc.nextLine();
        String A2 = sc.nextLine();
        sc.close();
        String[] a1_ary = A1.split(" ");
        String[] a2_ary = A2.split(" ");
        int[] a1 = new int[N];
        int[] a2 = new int[N];
        int[][] a = new int[2][N];
        int max = 0;

        for (int i = 0; i < N; i++) {
            a1[i] = Integer.valueOf(a1_ary[i]);
            a2[i] = Integer.valueOf(a2_ary[i]);
        }
        for (int i = 0; i < N; i++) {
            a[0][i] = a1[i];
        }
        for (int i = 0; i < N; i++) {
            a[1][i] = a2[i];
        }

        for (int i = 0; i < N; i++) {
            max = Math.max(calcScore(a, i), max);
        }

        System.out.println(max);
    }
} import java.util.Scanner; Scanner java.util class Main {
    private static int calcScore(int[][] a, int down) {

        int count = 0;
        for (int j = 0; j < a[0].length; j++) {
            if (j == down) {
                count += a[0][j];
                count += a[1][j];
            }else if( j < down){
                count += a[0][j];
            }else  if(j > down){
                count += a[1][j];               
            }
        }
        return count;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        sc.nextLine();
        String A1 = sc.nextLine();
        String A2 = sc.nextLine();
        sc.close();
        String[] a1_ary = A1.split(" ");
        String[] a2_ary = A2.split(" ");
        int[] a1 = new int[N];
        int[] a2 = new int[N];
        int[][] a = new int[2][N];
        int max = 0;

        for (int i = 0; i < N; i++) {
            a1[i] = Integer.valueOf(a1_ary[i]);
            a2[i] = Integer.valueOf(a2_ary[i]);
        }
        for (int i = 0; i < N; i++) {
            a[0][i] = a1[i];
        }
        for (int i = 0; i < N; i++) {
            a[1][i] = a2[i];
        }

        for (int i = 0; i < N; i++) {
            max = Math.max(calcScore(a, i), max);
        }

        System.out.println(max);
    }
} Main private static int calcScore(int[][] a, int down) {

        int count = 0;
        for (int j = 0; j < a[0].length; j++) {
            if (j == down) {
                count += a[0][j];
                count += a[1][j];
            }else if( j < down){
                count += a[0][j];
            }else  if(j > down){
                count += a[1][j];               
            }
        }
        return count;
    } calcScore {

        int count = 0;
        for (int j = 0; j < a[0].length; j++) {
            if (j == down) {
                count += a[0][j];
                count += a[1][j];
            }else if( j < down){
                count += a[0][j];
            }else  if(j > down){
                count += a[1][j];               
            }
        }
        return count;
    } int count = 0; count 0 for (int j = 0; j < a[0].length; j++) {
            if (j == down) {
                count += a[0][j];
                count += a[1][j];
            }else if( j < down){
                count += a[0][j];
            }else  if(j > down){
                count += a[1][j];               
            }
        } int j = 0; int j = 0; j 0 j < a[0].length j a[0].length a[0] a 0 a[0].length j++ j++ j {
            if (j == down) {
                count += a[0][j];
                count += a[1][j];
            }else if( j < down){
                count += a[0][j];
            }else  if(j > down){
                count += a[1][j];               
            }
        } {
            if (j == down) {
                count += a[0][j];
                count += a[1][j];
            }else if( j < down){
                count += a[0][j];
            }else  if(j > down){
                count += a[1][j];               
            }
        } if (j == down) {
                count += a[0][j];
                count += a[1][j];
            }else if( j < down){
                count += a[0][j];
            }else  if(j > down){
                count += a[1][j];               
            } j == down j down {
                count += a[0][j];
                count += a[1][j];
            } count += a[0][j] count a[0][j] a[0] a 0 j count += a[1][j] count a[1][j] a[1] a 1 j if( j < down){
                count += a[0][j];
            }else  if(j > down){
                count += a[1][j];               
            } j < down j down {
                count += a[0][j];
            } count += a[0][j] count a[0][j] a[0] a 0 j if(j > down){
                count += a[1][j];               
            } j > down j down {
                count += a[1][j];               
            } count += a[1][j] count a[1][j] a[1] a 1 j return count; count int[][] a a int down down public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        sc.nextLine();
        String A1 = sc.nextLine();
        String A2 = sc.nextLine();
        sc.close();
        String[] a1_ary = A1.split(" ");
        String[] a2_ary = A2.split(" ");
        int[] a1 = new int[N];
        int[] a2 = new int[N];
        int[][] a = new int[2][N];
        int max = 0;

        for (int i = 0; i < N; i++) {
            a1[i] = Integer.valueOf(a1_ary[i]);
            a2[i] = Integer.valueOf(a2_ary[i]);
        }
        for (int i = 0; i < N; i++) {
            a[0][i] = a1[i];
        }
        for (int i = 0; i < N; i++) {
            a[1][i] = a2[i];
        }

        for (int i = 0; i < N; i++) {
            max = Math.max(calcScore(a, i), max);
        }

        System.out.println(max);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        sc.nextLine();
        String A1 = sc.nextLine();
        String A2 = sc.nextLine();
        sc.close();
        String[] a1_ary = A1.split(" ");
        String[] a2_ary = A2.split(" ");
        int[] a1 = new int[N];
        int[] a2 = new int[N];
        int[][] a = new int[2][N];
        int max = 0;

        for (int i = 0; i < N; i++) {
            a1[i] = Integer.valueOf(a1_ary[i]);
            a2[i] = Integer.valueOf(a2_ary[i]);
        }
        for (int i = 0; i < N; i++) {
            a[0][i] = a1[i];
        }
        for (int i = 0; i < N; i++) {
            a[1][i] = a2[i];
        }

        for (int i = 0; i < N; i++) {
            max = Math.max(calcScore(a, i), max);
        }

        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 sc.nextLine() sc.nextLine sc String A1 = sc.nextLine(); A1 sc.nextLine() sc.nextLine sc String A2 = sc.nextLine(); A2 sc.nextLine() sc.nextLine sc sc.close() sc.close sc String[] a1_ary = A1.split(" "); a1_ary A1.split(" ") A1.split A1 " " String[] a2_ary = A2.split(" "); a2_ary A2.split(" ") A2.split A2 " " int[] a1 = new int[N]; a1 new int[N] N int[] a2 = new int[N]; a2 new int[N] N int[][] a = new int[2][N]; a new int[2][N] 2 N int max = 0; max 0 for (int i = 0; i < N; i++) {
            a1[i] = Integer.valueOf(a1_ary[i]);
            a2[i] = Integer.valueOf(a2_ary[i]);
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            a1[i] = Integer.valueOf(a1_ary[i]);
            a2[i] = Integer.valueOf(a2_ary[i]);
        } {
            a1[i] = Integer.valueOf(a1_ary[i]);
            a2[i] = Integer.valueOf(a2_ary[i]);
        } a1[i] = Integer.valueOf(a1_ary[i]) a1[i] a1 i Integer.valueOf(a1_ary[i]) Integer.valueOf Integer a1_ary[i] a1_ary i a2[i] = Integer.valueOf(a2_ary[i]) a2[i] a2 i Integer.valueOf(a2_ary[i]) Integer.valueOf Integer a2_ary[i] a2_ary i for (int i = 0; i < N; i++) {
            a[0][i] = a1[i];
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            a[0][i] = a1[i];
        } {
            a[0][i] = a1[i];
        } a[0][i] = a1[i] a[0][i] a[0] a 0 i a1[i] a1 i for (int i = 0; i < N; i++) {
            a[1][i] = a2[i];
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            a[1][i] = a2[i];
        } {
            a[1][i] = a2[i];
        } a[1][i] = a2[i] a[1][i] a[1] a 1 i a2[i] a2 i for (int i = 0; i < N; i++) {
            max = Math.max(calcScore(a, i), max);
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            max = Math.max(calcScore(a, i), max);
        } {
            max = Math.max(calcScore(a, i), max);
        } max = Math.max(calcScore(a, i), max) max Math.max(calcScore(a, i), max) Math.max Math calcScore(a, i) calcScore a i max System.out.println(max) System.out.println System.out System System.out max String[] args args
import java.util.Scanner;

class Main {
    private static int calcScore(int[][] a, int down) {

        int count = 0;
        for (int j = 0; j < a[0].length; j++) {
            if (j == down) {
                count += a[0][j];
                count += a[1][j];
            }else if( j < down){
                count += a[0][j];
            }else  if(j > down){
                count += a[1][j];               
            }
        }
        return count;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        sc.nextLine();
        String A1 = sc.nextLine();
        String A2 = sc.nextLine();
        sc.close();
        String[] a1_ary = A1.split(" ");
        String[] a2_ary = A2.split(" ");
        int[] a1 = new int[N];
        int[] a2 = new int[N];
        int[][] a = new int[2][N];
        int max = 0;

        for (int i = 0; i < N; i++) {
            a1[i] = Integer.valueOf(a1_ary[i]);
            a2[i] = Integer.valueOf(a2_ary[i]);
        }
        for (int i = 0; i < N; i++) {
            a[0][i] = a1[i];
        }
        for (int i = 0; i < N; i++) {
            a[1][i] = a2[i];
        }

        for (int i = 0; i < N; i++) {
            max = Math.max(calcScore(a, i), max);
        }

        System.out.println(max);
    }
}
