#include<iostream>
#include<algorithm>
using lint=int64_t;
using namespace std;

const lint mod=1e9+7;

int main()
{
	int N,M;
	int a[100010]={};
	lint dp[100010]={};

	cin >> N >> M;
	for(int i=0;i<M;i++)
	{
		cin >> a[i];
		dp[a[i]]=-1;
	}

	dp[0]=1;
	dp[1]=1;
	for(int i=2;i<=N;i++)
	{
		if(dp[i]==-1)
			continue;

		dp[i]=(max(0LL,dp[i-1])+max(0LL,dp[i-2]));
		dp[i]%=mod;
	}

	cout << max(0LL,dp[N]) << endl;
	return 0;
}

