#include<bits/stdc++.h>
using namespace std;
long long n,m,x,a[100010]={1};
int main(){
	cin>>n>>m;
	for(int i=0;i<m;i++){
		cin>>x;
		a[x]=-1;
	}
	for(int i=1;i<=n;i++){
		if(a[i]!=-1){
			if(a[i-1]!=-1)
				a[i]=(a[i]+a[i-1])%1000000007;
			if(a[i-2]!=-1)
				a[i]=(a[i]+a[i-1])%1000000007;
		}
	}
	if(a[n]==-1)
		cout<<0;
	else
		cout<<a[n]%%1000000007;
	return 0;
}