#include<bits/stdc++.h>
using namespace std;

int main(){
	cin.tie(0),ios::sync_with_stdio(false);
	int n,m; cin>>n>>m;
	vector<uint64_t>a(n+1); a.at(0)=a.at(1)=1;
	vector<bool>v(n+1,true);
	for(int i=0;i<m;++i){
		int A; cin>>A;
		v.at(A)=false;
	}
	for(int i=2;i<=n;++i){
		if(v.at(i)){
			if(v.at(i-2))a.at(i)+=a.at(i-2);
			if(v.at(i-1))a.at(i)+=a.at(i-1);
		}
	}
	cout<<a.back()%(int)(1e9+7)<<"\n"s;
}