#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>

#define INF 1000000

using namespace std;

unsigned int memo[100001];
unsigned int memb[100000];
int length = 0;

void bfib(int n) {
	bool bf = false;
	for (int i = 0; i < length; ++i) {
		if (memb[i] == 1) {
			bf = true;
		}
		if (memb[i] == n) {
			memo[n] = 0;
			return;
		}
	}
	if (n == 1) {
		memo[n] = 1;
		return;
	}
	if (n == 2) {
		if (bf == true) {
			memo[n] = 1;
		}
		else {
			memo[n] = 2;
		}
		return;
	}
	else {
		memo[n] = (memo[n - 1] + memo[n - 2]) % 1000000007;
		return;
	}
}

int main(void)
{
	int n, nb, buf;
	n = nb = buf = 0;
	scanf_s("%d %d", &n, &nb);
	length = nb;
	for (int i = 0; i < nb; ++i) {
		scanf_s("%d", &buf);
		memb[i] = buf;
	}
	for (int i = 0; i <= n; ++i) {
		bfib(i);
	}
	cout << memo[n];

	return 0;

}