include<iostream>
#include<cmath>
#include<algorithm>

using namespace std;

int main()
{
	long n, m;
	cin >> n >> m;

	unsigned long long ans[100000];
	bool hole[100000];
	for (long i = 0; i < m; i++)
	{
		long a;
		cin >> a;
		hole[a] = true;
	}

	//i段目までの総数を求める
	ans[1] = 1;
	ans[2] = 2;

	if (hole[2] == true)
	{
		ans[2] = 0;
	}
	if (hole[1] == true) {
		ans[1] = 0;
		ans[2] = 1;
	}
	if (hole[2] == true)
	{
		ans[2] = 0;
	}

	for (long i = 3; i < n + 1; i++)
	{
		ans[i] = ans[i - 2] + ans[i - 1];
		/*if (hole[i - 1] == true)
		{
			ans[i] -= ans[i - 1];
		}
		if (hole[i - 2] == true)
		{
			ans[i] -= ans[i - 2];
		}*/
		if (hole[i] == true)
		{
			ans[i] = 0;
		}
		//cout << "ans[" << i << "] = " << ans[i] << endl;
	}

	cout << ans[n] % 1000000007 << endl;
}