#include <bits/stdc++.h>

using namespace std;
using ll =long long;
using db = double;

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

#define che(a,string) cout<<"//"<<string <<"=="<<(a)<<"//" <<endl;
#define SORT(a) sort((a).begin(),(a).end())
#define rSORT(a) reverse((a).begin(),(a).end())
#define For(i, a, b)    for(int i = (a) ; i < (b) ; ++i)
#define rep(i, n)       For(i, 0, n)
#define leftunique(v) SORT(v);(v).erase(unique((v).begin(),(v).end()),(v).end())
//leftuniqueは配列から同じ要素のものを取り除く 例 4 6 2 1 3 4 1 2 なら 1 2 3 4 6 になる
bool IsInt(double a){int b = a/1;if(a==b){return true;}else {return false;}}
bool coY() {cout <<"Yes"<<endl;}
bool coN(){cout <<"No"<<endl;}
const ll mod = 1e9 + 7;
const ll INF = 1LL << 60;


//ここから書き始める
int main()
{
	ll n;
	ll m;
	vector<ll> dp(100100,-1);

	//dpの初期化
	rep(i,100100){
		dp[i] = 0;
	}
	cin >> n >>m;
	rep(i,m){
		ll broken_stair;
		cin >> broken_stair;
		dp[broken_stair] = -1;
	}
	for(int i = 2 ; i < n + 1 ; i++){
		ll a = dp[i-1];
		if(a<0) a = 0;
		ll b = dp[i-2];
		if(b<0) b =0 ;
		if(dp[i]!=0){
			dp[i] = a + b;
		}
	}
	if(dp[i]<0) cout << 0 << endl;
	else{
	cout <<dp[n]%mod <<endl;
	}
}
