
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N= sc.nextInt();
        int [] a_1 = new int [N];
        int [] a_2 = new int [N];
        for (int i = 0 ; i < N ; i++) {
            a_1[i] = sc.nextInt();
        }
        int initCandy = a_1[0];
        for (int i = 0 ; i < N ; i++) {
            int a = sc.nextInt();
            a_2[i] = a;
            initCandy += a;
        }
        int maxCandy = initCandy;
        for (int i = 1 ; i < N  ; i ++) {
            initCandy = initCandy + a_1[i] - a_2[i - 1];
            maxCandy = Math.max(maxCandy, initCandy);
        }
        System.out.println(maxCandy);
    }

} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N= sc.nextInt();
        int [] a_1 = new int [N];
        int [] a_2 = new int [N];
        for (int i = 0 ; i < N ; i++) {
            a_1[i] = sc.nextInt();
        }
        int initCandy = a_1[0];
        for (int i = 0 ; i < N ; i++) {
            int a = sc.nextInt();
            a_2[i] = a;
            initCandy += a;
        }
        int maxCandy = initCandy;
        for (int i = 1 ; i < N  ; i ++) {
            initCandy = initCandy + a_1[i] - a_2[i - 1];
            maxCandy = Math.max(maxCandy, initCandy);
        }
        System.out.println(maxCandy);
    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N= sc.nextInt();
        int [] a_1 = new int [N];
        int [] a_2 = new int [N];
        for (int i = 0 ; i < N ; i++) {
            a_1[i] = sc.nextInt();
        }
        int initCandy = a_1[0];
        for (int i = 0 ; i < N ; i++) {
            int a = sc.nextInt();
            a_2[i] = a;
            initCandy += a;
        }
        int maxCandy = initCandy;
        for (int i = 1 ; i < N  ; i ++) {
            initCandy = initCandy + a_1[i] - a_2[i - 1];
            maxCandy = Math.max(maxCandy, initCandy);
        }
        System.out.println(maxCandy);
    } main {
        Scanner sc = new Scanner(System.in);
        int N= sc.nextInt();
        int [] a_1 = new int [N];
        int [] a_2 = new int [N];
        for (int i = 0 ; i < N ; i++) {
            a_1[i] = sc.nextInt();
        }
        int initCandy = a_1[0];
        for (int i = 0 ; i < N ; i++) {
            int a = sc.nextInt();
            a_2[i] = a;
            initCandy += a;
        }
        int maxCandy = initCandy;
        for (int i = 1 ; i < N  ; i ++) {
            initCandy = initCandy + a_1[i] - a_2[i - 1];
            maxCandy = Math.max(maxCandy, initCandy);
        }
        System.out.println(maxCandy);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N= sc.nextInt(); N sc.nextInt() sc.nextInt sc int [] a_1 = new int [N]; a_1 new int [N] N int [] a_2 = new int [N]; a_2 new int [N] N for (int i = 0 ; i < N ; i++) {
            a_1[i] = sc.nextInt();
        } int i = 0 ; int i = 0 ; i 0 i < N i N i++ i++ i {
            a_1[i] = sc.nextInt();
        } {
            a_1[i] = sc.nextInt();
        } a_1[i] = sc.nextInt() a_1[i] a_1 i sc.nextInt() sc.nextInt sc int initCandy = a_1[0]; initCandy a_1[0] a_1 0 for (int i = 0 ; i < N ; i++) {
            int a = sc.nextInt();
            a_2[i] = a;
            initCandy += a;
        } int i = 0 ; int i = 0 ; i 0 i < N i N i++ i++ i {
            int a = sc.nextInt();
            a_2[i] = a;
            initCandy += a;
        } {
            int a = sc.nextInt();
            a_2[i] = a;
            initCandy += a;
        } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc a_2[i] = a a_2[i] a_2 i a initCandy += a initCandy a int maxCandy = initCandy; maxCandy initCandy for (int i = 1 ; i < N  ; i ++) {
            initCandy = initCandy + a_1[i] - a_2[i - 1];
            maxCandy = Math.max(maxCandy, initCandy);
        } int i = 1 ; int i = 1 ; i 1 i < N i N i ++ i ++ i {
            initCandy = initCandy + a_1[i] - a_2[i - 1];
            maxCandy = Math.max(maxCandy, initCandy);
        } {
            initCandy = initCandy + a_1[i] - a_2[i - 1];
            maxCandy = Math.max(maxCandy, initCandy);
        } initCandy = initCandy + a_1[i] - a_2[i - 1] initCandy initCandy + a_1[i] - a_2[i - 1] initCandy + a_1[i] initCandy a_1[i] a_1 i a_2[i - 1] a_2 i - 1 i 1 maxCandy = Math.max(maxCandy, initCandy) maxCandy Math.max(maxCandy, initCandy) Math.max Math maxCandy initCandy System.out.println(maxCandy) System.out.println System.out System System.out maxCandy String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N= sc.nextInt();
        int [] a_1 = new int [N];
        int [] a_2 = new int [N];
        for (int i = 0 ; i < N ; i++) {
            a_1[i] = sc.nextInt();
        }
        int initCandy = a_1[0];
        for (int i = 0 ; i < N ; i++) {
            int a = sc.nextInt();
            a_2[i] = a;
            initCandy += a;
        }
        int maxCandy = initCandy;
        for (int i = 1 ; i < N  ; i ++) {
            initCandy = initCandy + a_1[i] - a_2[i - 1];
            maxCandy = Math.max(maxCandy, initCandy);
        }
        System.out.println(maxCandy);
    }

} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N= sc.nextInt();
        int [] a_1 = new int [N];
        int [] a_2 = new int [N];
        for (int i = 0 ; i < N ; i++) {
            a_1[i] = sc.nextInt();
        }
        int initCandy = a_1[0];
        for (int i = 0 ; i < N ; i++) {
            int a = sc.nextInt();
            a_2[i] = a;
            initCandy += a;
        }
        int maxCandy = initCandy;
        for (int i = 1 ; i < N  ; i ++) {
            initCandy = initCandy + a_1[i] - a_2[i - 1];
            maxCandy = Math.max(maxCandy, initCandy);
        }
        System.out.println(maxCandy);
    }

} Main

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N= sc.nextInt();
        int [] a_1 = new int [N];
        int [] a_2 = new int [N];
        for (int i = 0 ; i < N ; i++) {
            a_1[i] = sc.nextInt();
        }
        int initCandy = a_1[0];
        for (int i = 0 ; i < N ; i++) {
            int a = sc.nextInt();
            a_2[i] = a;
            initCandy += a;
        }
        int maxCandy = initCandy;
        for (int i = 1 ; i < N  ; i ++) {
            initCandy = initCandy + a_1[i] - a_2[i - 1];
            maxCandy = Math.max(maxCandy, initCandy);
        }
        System.out.println(maxCandy);
    }

}