#include <bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp>
using bint = boost::multiprecision::cpp_int;

int main()
{
    int N, M;
    std::cin >> N >> M;
    std::vector<int> as(M);
    for (int i = 0; i < M; i++) {
        std::cin >> as.at(i);
    }
    bint p_i = 1;
    bint p_i1 = 1;
    bint p_i2;
    for (int i = 0; i < N - 1; i++) {
        p_i2 = ((std::binary_search(as.begin(), as.end(), i) ? 0 : p_i)
            + (std::binary_search(as.begin(), as.end(), i + 1) ? 0 : p_i1)) % 1000000007;
        p_i = p_i1;
        p_i1 = p_i2;

    }
    std::cout << p_i2 << std::endl;
    return 0;
}