#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using str = string;
using P = pair<int, int>;
using Pll = pair<ll, ll>;
const double PI = 3.141592653589793238;
const ll mod = 1'000'000'007;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define REP(i, m, n) for (int i = m; i < (int)n; i++)
#define all(a) (a).begin(), (a).end()
#define allg(a) (a).begin(), (a).end(), greator<>()
#define d20 std::setprecision(20)
#define veci vector<int>
#define vecll vector<long long int>
#define vecb vector<bool>
#define vecd vector<double>
template <typename T>
T lcm(T a, T b)
{
	return a / __gcd(a, b) * b;
}
void comb(vector<vector<long long int>> &v)
{
	for (size_t i = 0; i < v.size(); i++)
	{
		v[i][0] = 1;
		v[i][i] = 1;
	}
	for (size_t k = 1; k < v.size(); k++)
	{
		for (size_t j = 1; j < k; j++)
		{
			v[k][j] = (v[k - 1][j - 1] + v[k - 1][j]);
		}
	}
}
ll repeat_squaring(ll n, ll p, ll m)
{
	if (p == 0)
		return 1;
	if (p % 2 == 0)
	{
		ll t = repeat_squaring(n, p / 2, m);
		return t * t % m;
	}
	return n * repeat_squaring(n, p - 1, m);
}

int fff[100025] = {0};
bool is_broken[100025] = {false};

void check_(vector<ll> mm)
{
	rep(i, mm.size())
	{
		is_broken[mm[i]] = true;
	}
}

int f(int n)
{
	fff[0] = 1;
	fff[1] = 1;
	for (size_t i = 2; i < n + 1; i++)
	{
		if (is_broken[i])
		{
			if (is_broken[i + 1])
			{
				return 0;
			}
			fff[i + 1] = fff[i - 1];
			fff[i + 2] = fff[i - 1];
			i = i + 2;
		}
		else
		{
			fff[i] = (fff[i - 1] + fff[i - 2]) % mod;
		}
	}
	return fff[n];
}

int main()
{
	int n, m;
	cin >> n >> m;
	vecll mm(m);
	rep(i, m) cin >> mm[i];
	check_(mm);
	cout << f(n) << endl;

	return 0;
}