#include<bits/stdc++.h>
using namespace std;
typedef unsigned int ll;
#define rep(i,n) for(int i=0;i<n;++i)
#define repf(i,n) for(int i=0;i<=n;i++)
const ll mod=1000000000+7;
typedef pair<ll, ll> P;

ll N,M;
priority_queue<ll,vector<ll>,greater<ll> > A;
ll dp[100010];

int main(){
	cin >> N >> M;
	rep(i,M){
		ll a;cin >> a;
		A.push(a);
	}

	dp[0] = 1; dp[1] = 1;
	ll cur;
	if(!(A.empty()))ll next = A.top();
	for(int i=1;i<N;i++){
		cur = next;
		if(!(A.empty())){
			next = A.top();
			if(i == next){
				dp[i] = 0;
				dp[i+1] = (dp[i] + dp[i-1]) % mod;
				A.pop();
				continue;
			}
			if(cur + 1 == next){
				cout << 0 << endl;
			}
		}

		dp[i+1] = (dp[i] + dp[i-1]) % mod;
	}

	cout << dp[N] << endl;
}