import java.util.*;

public class Main {

    void run() {
        Scanner sc = new Scanner(System.in);

        int MOD =  1000000007;
        int n = sc.nextInt();
        int m = sc.nextInt();
        boolean[] aArr = new boolean[n + 100];
        int[] dp = new int[n + 100];

        for (int i = 0; i < m; i++) {
            aArr[sc.nextInt()] = true;
        }

        dp[0] = 1;

        for (int i = 0; i < n; i++) {
            if (!aArr[i + 1]) dp[i + 1] = (dp[i + 1] + dp[i]) % MOD;
            if (!aArr[i + 2]) dp[i + 2] = (dp[i + 2] + dp[i]) % MOD;
        }

//        for (int i = 0; i < n; i++) {
//            debug("i: " + dp[i]);
//        }
//
        System.out.println(dp[n]);
    }

    void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    }

    public static void main(String[] args) {
        new Main().run();
    }
} import java.util.*; util.* java public class Main {

    void run() {
        Scanner sc = new Scanner(System.in);

        int MOD =  1000000007;
        int n = sc.nextInt();
        int m = sc.nextInt();
        boolean[] aArr = new boolean[n + 100];
        int[] dp = new int[n + 100];

        for (int i = 0; i < m; i++) {
            aArr[sc.nextInt()] = true;
        }

        dp[0] = 1;

        for (int i = 0; i < n; i++) {
            if (!aArr[i + 1]) dp[i + 1] = (dp[i + 1] + dp[i]) % MOD;
            if (!aArr[i + 2]) dp[i + 2] = (dp[i + 2] + dp[i]) % MOD;
        }

//        for (int i = 0; i < n; i++) {
//            debug("i: " + dp[i]);
//        }
//
        System.out.println(dp[n]);
    }

    void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    }

    public static void main(String[] args) {
        new Main().run();
    }
} Main void run() {
        Scanner sc = new Scanner(System.in);

        int MOD =  1000000007;
        int n = sc.nextInt();
        int m = sc.nextInt();
        boolean[] aArr = new boolean[n + 100];
        int[] dp = new int[n + 100];

        for (int i = 0; i < m; i++) {
            aArr[sc.nextInt()] = true;
        }

        dp[0] = 1;

        for (int i = 0; i < n; i++) {
            if (!aArr[i + 1]) dp[i + 1] = (dp[i + 1] + dp[i]) % MOD;
            if (!aArr[i + 2]) dp[i + 2] = (dp[i + 2] + dp[i]) % MOD;
        }

//        for (int i = 0; i < n; i++) {
//            debug("i: " + dp[i]);
//        }
//
        System.out.println(dp[n]);
    } run {
        Scanner sc = new Scanner(System.in);

        int MOD =  1000000007;
        int n = sc.nextInt();
        int m = sc.nextInt();
        boolean[] aArr = new boolean[n + 100];
        int[] dp = new int[n + 100];

        for (int i = 0; i < m; i++) {
            aArr[sc.nextInt()] = true;
        }

        dp[0] = 1;

        for (int i = 0; i < n; i++) {
            if (!aArr[i + 1]) dp[i + 1] = (dp[i + 1] + dp[i]) % MOD;
            if (!aArr[i + 2]) dp[i + 2] = (dp[i + 2] + dp[i]) % MOD;
        }

//        for (int i = 0; i < n; i++) {
//            debug("i: " + dp[i]);
//        }
//
        System.out.println(dp[n]);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int MOD =  1000000007; MOD 1000000007 int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc boolean[] aArr = new boolean[n + 100]; aArr new boolean[n + 100] n + 100 n 100 int[] dp = new int[n + 100]; dp new int[n + 100] n + 100 n 100 for (int i = 0; i < m; i++) {
            aArr[sc.nextInt()] = true;
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            aArr[sc.nextInt()] = true;
        } {
            aArr[sc.nextInt()] = true;
        } aArr[sc.nextInt()] = true aArr[sc.nextInt()] aArr sc.nextInt() sc.nextInt sc true dp[0] = 1 dp[0] dp 0 1 for (int i = 0; i < n; i++) {
            if (!aArr[i + 1]) dp[i + 1] = (dp[i + 1] + dp[i]) % MOD;
            if (!aArr[i + 2]) dp[i + 2] = (dp[i + 2] + dp[i]) % MOD;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if (!aArr[i + 1]) dp[i + 1] = (dp[i + 1] + dp[i]) % MOD;
            if (!aArr[i + 2]) dp[i + 2] = (dp[i + 2] + dp[i]) % MOD;
        } {
            if (!aArr[i + 1]) dp[i + 1] = (dp[i + 1] + dp[i]) % MOD;
            if (!aArr[i + 2]) dp[i + 2] = (dp[i + 2] + dp[i]) % MOD;
        } if (!aArr[i + 1]) dp[i + 1] = (dp[i + 1] + dp[i]) % MOD; !aArr[i + 1] aArr[i + 1] aArr i + 1 i 1 dp[i + 1] = (dp[i + 1] + dp[i]) % MOD dp[i + 1] dp i + 1 i 1 (dp[i + 1] + dp[i]) % MOD (dp[i + 1] + dp[i]) dp[i + 1] dp i + 1 i 1 dp[i] dp i MOD if (!aArr[i + 2]) dp[i + 2] = (dp[i + 2] + dp[i]) % MOD; !aArr[i + 2] aArr[i + 2] aArr i + 2 i 2 dp[i + 2] = (dp[i + 2] + dp[i]) % MOD dp[i + 2] dp i + 2 i 2 (dp[i + 2] + dp[i]) % MOD (dp[i + 2] + dp[i]) dp[i + 2] dp i + 2 i 2 dp[i] dp i MOD System.out.println(dp[n]) System.out.println System.out System System.out dp[n] dp n void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    } debug {
        System.err.println(Arrays.deepToString(os));
    } System.err.println(Arrays.deepToString(os)) System.err.println System.err System System.err Arrays.deepToString(os) Arrays.deepToString Arrays os Object... os os public static void main(String[] args) {
        new Main().run();
    } main {
        new Main().run();
    } new Main().run() new Main().run new Main() String[] args args public class Main {

    void run() {
        Scanner sc = new Scanner(System.in);

        int MOD =  1000000007;
        int n = sc.nextInt();
        int m = sc.nextInt();
        boolean[] aArr = new boolean[n + 100];
        int[] dp = new int[n + 100];

        for (int i = 0; i < m; i++) {
            aArr[sc.nextInt()] = true;
        }

        dp[0] = 1;

        for (int i = 0; i < n; i++) {
            if (!aArr[i + 1]) dp[i + 1] = (dp[i + 1] + dp[i]) % MOD;
            if (!aArr[i + 2]) dp[i + 2] = (dp[i + 2] + dp[i]) % MOD;
        }

//        for (int i = 0; i < n; i++) {
//            debug("i: " + dp[i]);
//        }
//
        System.out.println(dp[n]);
    }

    void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    }

    public static void main(String[] args) {
        new Main().run();
    }
} public class Main {

    void run() {
        Scanner sc = new Scanner(System.in);

        int MOD =  1000000007;
        int n = sc.nextInt();
        int m = sc.nextInt();
        boolean[] aArr = new boolean[n + 100];
        int[] dp = new int[n + 100];

        for (int i = 0; i < m; i++) {
            aArr[sc.nextInt()] = true;
        }

        dp[0] = 1;

        for (int i = 0; i < n; i++) {
            if (!aArr[i + 1]) dp[i + 1] = (dp[i + 1] + dp[i]) % MOD;
            if (!aArr[i + 2]) dp[i + 2] = (dp[i + 2] + dp[i]) % MOD;
        }

//        for (int i = 0; i < n; i++) {
//            debug("i: " + dp[i]);
//        }
//
        System.out.println(dp[n]);
    }

    void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    }

    public static void main(String[] args) {
        new Main().run();
    }
} Main
import java.util.*;

public class Main {

    void run() {
        Scanner sc = new Scanner(System.in);

        int MOD =  1000000007;
        int n = sc.nextInt();
        int m = sc.nextInt();
        boolean[] aArr = new boolean[n + 100];
        int[] dp = new int[n + 100];

        for (int i = 0; i < m; i++) {
            aArr[sc.nextInt()] = true;
        }

        dp[0] = 1;

        for (int i = 0; i < n; i++) {
            if (!aArr[i + 1]) dp[i + 1] = (dp[i + 1] + dp[i]) % MOD;
            if (!aArr[i + 2]) dp[i + 2] = (dp[i + 2] + dp[i]) % MOD;
        }

//        for (int i = 0; i < n; i++) {
//            debug("i: " + dp[i]);
//        }
//
        System.out.println(dp[n]);
    }

    void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    }

    public static void main(String[] args) {
        new Main().run();
    }
}
