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

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

using namespace std;

typedef long long int ll;

typedef pair<ll, ll> P;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }

template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }



const int mod = 1000000007;

struct mint{

	ll x;

	mint(ll x = 0):x((x%mod+mod)%mod){}

	mint operator-() const{return mint(-x);}

	mint& operator+=(const mint a){

		if((x += a.x) >= mod) x -= mod;

		return *this;

	}

	mint& operator-=(const mint a){

		if((x += mod-a.x) >= mod) x -= mod;

		return *this;

	}

	mint& operator*=(const mint a){

		(x *= a.x) %= mod;

		return *this;

	}

	mint operator+(const mint a) const{

		mint res(*this);

		return res+=a;

	}

	mint operator-(const mint a) const{

		mint res(*this);

		return res-=a;

	}

	mint operator*(const mint a) const{

		mint res(*this);

		return res*=a;

	}

	mint pow(ll t) const{

		if(!t) return 1;

		mint a = pow(t>>1);

		a *= a;

		if(t&1) a *= *this;

		return a;

	}

	mint inv() const{

		return pow(mod-2);

	}

	mint& operator/=(const mint a){

		return (*this) *= a.inv();

	}

	mint operator/(const mint a) const{

		mint res(*this);

		return res/=a;

	}

	bool operator==(const mint a){

		return x == a.x;

	}

};



mint dp[100005];



int main(){

    cin.tie(0);

    ios::sync_with_stdio(false);

    int n, m;

    cin >> n >> m;

    set<int> a;

    rep(i,m){

        int x;

        cin >> x;

        a.insert(x);

    }

    dp[0] = 1;

    rep(i,n){

        if(a.find(i+1) == a.end()) dp[i+1] += dp[i];

        if(a.find(i+2) == a.end()) dp[i+2] += dp[i];

    }

    cout << dp[n].x << endl;

    return 0;

}


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

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

using namespace std;

typedef long long int ll;

typedef pair<int, int> P;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }

template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }



const int mod = 1000000007;

struct mint{

	ll x;

	mint(ll x = 0):x((x%mod+mod)%mod){}

	mint operator-() const{return mint(-x);}

	mint& operator+=(const mint a){

		if((x += a.x) >= mod) x -= mod;

		return *this;

	}

	mint& operator-=(const mint a){

		if((x += mod-a.x) >= mod) x -= mod;

		return *this;

	}

	mint& operator*=(const mint a){

		(x *= a.x) %= mod;

		return *this;

	}

	mint operator+(const mint a) const{

		mint res(*this);

		return res+=a;

	}

	mint operator-(const mint a) const{

		mint res(*this);

		return res-=a;

	}

	mint operator*(const mint a) const{

		mint res(*this);

		return res*=a;

	}

	mint pow(ll t) const{

		if(!t) return 1;

		mint a = pow(t>>1);

		a *= a;

		if(t&1) a *= *this;

		return a;

	}

	mint inv() const{

		return pow(mod-2);

	}

	mint& operator/=(const mint a){

		return (*this) *= a.inv();

	}

	mint operator/(const mint a) const{

		mint res(*this);

		return res/=a;

	}

	bool operator==(const mint a){

		return x == a.x;

	}

    bool operator!=(const mint a){

		return x != a.x;

	}

};



int main(){

	cin.tie(0);

	ios::sync_with_stdio(false);

    int n, m;

    cin >> n >> m;

    vector<mint> dp(n+5, 0);

    rep(i,m){

        int a;

        cin >> a;

        dp[a] = -1;

    }

    dp[0] = 1;

    rep(i,n+1){

        if(dp[i] == -1) continue;

        if(dp[i+1] != -1) dp[i+1] += dp[i];

        if(dp[i+2] != -1) dp[i+2] += dp[i];

    }

    cout << dp[n].x << endl;

	return 0;

}

// Fastest known solution for this problem: