// Original C++ solution (slower):
#include "bits/stdc++.h"

// Custom Header <<<

#define ALL(x) x.begin(), x.end()

#define iostreamBooster() do{ cin.tie(nullptr); ios_base::sync_with_stdio(false); }while(0)

#define rep(i, s, n)      for(int i(s); i < int(n); ++i)

using namespace std;

using i64 = long long;

using pii = pair<int, int>;

template<class A, class B>inline bool chmax(A &a, const B &b){return b>a ? a=b,1 : 0;}

template<class A, class B>inline bool chmin(A &a, const B &b){return b<a ? a=b,1 : 0;}

constexpr int INF  = 0x3f3f3f3f;

constexpr i64 LINF = 0x3f3f3f3f3f3f3f3fLL;

constexpr int MOD  = int(1e9) + 7;

// >>>



signed main()

{

    int N, M;

    bool a[100010] {};



    cin >> N >> M;

    rep(i, 0, M) {

        int x;

        cin >> x;

        a[x] = true;

    }



    i64 dp[100010] {};

    dp[0] = 1;

    rep(i, 0, N+1) {

        if (a[i]) continue;

        (dp[i+1] += dp[i]) %= MOD;

        (dp[i+2] += dp[i]) %= MOD;

    }



    cout << dp[N] << endl;



    return 0;

}



/* vim:set foldmethod=marker foldmarker=<<<,>>> : */


// Optimized solution to the same problem (faster):
#include "bits/stdc++.h"

// Begin Header {{{

#define all(x)          (x).begin(), (x).end()

#define rep(i, n)       for (i64 i = 0, i##_limit = (n); i < i##_limit; ++i)

#define reps(i, s, t)   for (i64 i = (s), i##_limit = (t); i <= i##_limit; ++i)

#define repr(i, s, t)   for (i64 i = (s), i##_limit = (t); i >= i##_limit; --i)

#ifndef DBG

#define trace(...)

#endif

using namespace std;

using i64 = int_fast64_t;

using pii = pair<i64, i64>;

template <class T, class U> inline bool chmax(T &a, const U &b) { return b > a && (a = b, true); }

template <class T, class U> inline bool chmin(T &a, const U &b) { return b < a && (a = b, true); }

constexpr int INF  = 0x3f3f3f3f;

constexpr i64 LINF = 0x3f3f3f3f3f3f3f3fLL;



template <class T>

inline vector<T> make_v(const T &initValue, size_t sz) {

    return vector<T>(sz, initValue);

}



template <class T, class... Args>

inline auto make_v(const T &initValue, size_t sz, Args... args) {

    return vector<decltype(make_v<T>(initValue, args...))>(sz, make_v<T>(initValue, args...));

}



template <class T>

inline istream& operator>> (istream &in, vector<T> &vec) {

    for (auto &e : vec) in >> e;

    return in;

}



inline void read() {}



template <class Head, class... Tail>

inline void read(Head &head, Tail&... tail) { cin >> head; read(tail...); }



inline void print() { cout << "\n"; }



template <class Head, class... Tail>

inline void print(Head &&head, Tail&&... tail) {

    cout << head;

    if (sizeof...(tail)) cout << ' ';

    print(forward<Tail>(tail)...);

}



template <class T>

inline ostream& operator<< (ostream &out, const vector<T> &vec) {

    static constexpr const char *delim[] = { " ", "" };

    for (const auto &e : vec) out << e << delim[&e == &vec.back()];

    return out;

}

// }}} End Header



constexpr int MOD = int(1e9) + 7;



signed main() {

    ios_base::sync_with_stdio(false); cin.tie(nullptr);



    i64 N, M;

    bool ng[100010] {};



    read(N, M);

    vector<i64> dp(N + 5, 0);

    rep(i, M) {

        int a; read(a);

        ng[a] = true;

    }



    dp[0] = 1;

    reps(i, 0, N) {

        if (!ng[i]) {

            (dp[i + 1] += dp[i]) %= MOD;

            (dp[i + 2] += dp[i]) %= MOD;

        }

    }



    print(dp[N]);



    return 0;

}


// Fastest known solution for this problem: