#include<iostream>
#include<sstream>
#include<fstream>
#include<string>
#include<vector>
#include<deque>
#include<queue>
#include<stack>
#include<map>
#include<set>
#include<utility>
#include<functional>
#include<algorithm>
#include<bitset>
#include<ctime>
#include<cmath>
#include<cstdio>
#include<cstdlib>
using namespace std;
const long long mod=1000000007;
int a[100005];
int main()
{
	int n,m;
	cin>>n>>m;
	for(int i=0;i<m;i++)
	{
		cin>>k;
		a[k]=-1;
	}
	a[0]=1;
	for(int i=1;i<=n;i++)
	{
		if(a[i]==-1)
			continue;
		if(i>=2&&a[i-2]!=-1)
			(a[i]+=a[i-2])%=mod;
		if(a[i-1]!=-1)
			(a[i]+=a[i-1])%=mod;
	}
	cout<<a[n];
	return 0;
}