//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <unordered_map>
#include <climits>
#include <set>
#include <unordered_set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <queue>
#include <random>
#include <complex>
#include <regex>
#include <locale>
#include <random>
#include <type_traits>

using namespace std;

#define SHOW_VECTOR(v) {std::cerr << #v << "\t:";for(const auto& xxx : v){std::cerr << xxx << " ";}std::cerr << "\n";}
#define SHOW_MAP(v){std::cerr << #v << endl; for(const auto& xxx: v){std::cerr << xxx.first << " " << xxx.second << "\n";}}

using LL = long long;

//------------------------------------------
//------------------------------------------

template<uint_fast64_t Modulas = 1000000007ul>
class ModInt {
    using u64 = uint_fast64_t;
public:
    u64 x;

    constexpr ModInt() : x(0) {}
    constexpr ModInt(const u64 x) : x(x % Modulas) {}
    constexpr u64 &value() noexcept { return x; }
    constexpr u64 &value() const noexcept { return x; }
    constexpr ModInt operator+(const ModInt rhs) const noexcept {
        return ModInt(*this) += rhs;
    }
    constexpr ModInt operator-(const ModInt rhs) const noexcept {
        return ModInt(*this) -= rhs;
    }
    constexpr ModInt operator*(const ModInt rhs) const noexcept {
        return ModInt(*this) *= rhs;
    }
    constexpr ModInt operator/(const ModInt rhs) const noexcept {
        return ModInt(*this) /= rhs;
    }
    constexpr ModInt operator+=(const ModInt rhs) noexcept {
        x += rhs.x;
        if (x >= Modulas) x -= Modulas;
        return *this;
    }
    constexpr ModInt operator-=(const ModInt rhs) noexcept {
        if (x < rhs.x) x += Modulas;
        x -= rhs.x;
        return *this;
    }
    constexpr ModInt operator*=(const ModInt rhs) noexcept {
        x = x * rhs.x % Modulas;
        return *this;
    }
    constexpr ModInt &operator/=(const ModInt rhs) noexcept {
        u64 exp = Modulas - 2;
        while (exp) {
            if (exp & 1ul) *this *= rhs;
            rhs *= rhs;
            exp >>= 1ul;
        }
        return *this;
    }
    constexpr ModInt &operator++() noexcept {
        x++;
        if (x >= Modulas) x -= Modulas;
        return *this;
    }
    constexpr ModInt &operator--() noexcept {
        if (x == 0) x += Modulas;
        x--;
        return *this;
    }
    constexpr bool operator<(const ModInt rhs) const noexcept {
        return x < rhs.x;
    }
    constexpr bool operator==(const ModInt rhs) const noexcept {
        return this->x == rhs.x;
    }
    constexpr bool operator!=(const ModInt rhs) const noexcept {
        return !(*this == rhs);
    }
    friend istream &operator>>(istream &in, ModInt &m) {
        in >> m.x;
        m.x %= Modulas;
        return in;
    }
    friend ostream &operator<<(ostream &out, const ModInt &p) {
        out << p.x;
        return out;
    }
    constexpr ModInt pow(u64 p) const {
        ModInt ret(1);
        ModInt mul(x);
        while (p > 0) {
            if (p & 1ul) ret *= mul;
            mul *= mul;
            p >>= 1ul;
        }
        return ret;
    }
    constexpr ModInt operator~() const noexcept {
        u64 exp = Modulas - 2;
        return pow(exp);
    }
};

int main() {

    LL N, M;
    cin >> N >> M;

    vector<LL> a(N + 3, 0);
    for (int i = 0; i < M; i++) {
        int d;
        cin >> d;
        a[d] = 1;
    }

    vector<ModInt<>> b(N + 3, 0);
    b[0] = 1;

    for (int i = 0; i < N; i++) {
        for (int j = 1; j <= 2; j++) {
            if (!a[i + j])
                b[i + j] += b[i];
        }
    }

    cout << b[N] << endl;


    return 0;
}







































Measured memory_bytes: 1920