#include <bits/stdc++.h>

using namespace std;

#define REP(i,n) for(ll (i) = (0);(i) < (n);++i)
#define REV(i,n) for(ll (i) = (n) - 1;(i) >= 0;--i)
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define FI first
#define SE second
#define SHOW1d(v,n) {REP(WW,n)cerr << v[WW] << ' ';cerr << endl << endl;}
#define SHOW2d(v,WW,HH) {REP(W_,WW){REP(H_,HH)cerr << v[W_][H_] << ' ';cerr << endl;}cerr << endl;}
#define ALL(v) v.begin(),v.end()
#define Decimal fixed<<setprecision(20)
#define INF 1000000000
#define LLINF 1000000000000000000LL
#define MOD 1e9+7

typedef long long ll;
typedef pair<ll,ll> P;

ll dp[111111];
bool ng[111111];

void modAdd(ll &a, ll b){
	a += b;
	a %= MOD;
}

int main(){
	cin.tie(0);cout.tie(0);ios::sync_with_stdio(false);
	ll n, m;cin >> n >> m;
	REP(i, m){
		ll a;cin >> a;ng[a] = true;
	}
	dp[0] = 1;
	REP(i, n){
		if(!ng[i+1])modAdd(dp[i+1], dp[i]);
		if(!ng[i+2])modAdd(dp[i+2], dp[i]);
	}
	cout << dp[n] << endl;
	return 0;
}
