#include <iostream>

using namespace std;

int main() {

	int n, m, l;
	bool state[100010];
	int pattern[100010];

	cin >> n >> m;

	for (int i = 0; i < n+5; i++) {
		state[i] = true;
	}

	pattern[0] = 1;

	for (int i = 1; i < n+5; i++) {
		pattern[i] = 0;
	}

	for (int i = 0; i < m; i++) {
		cin >> l;
		state[l] = false;
	}

	for (int i = 0; i < n +5; i++) {
		if (state[i + 1]) {
			pattern[i + 1] += pattern[i];
			pattern[i + 1] %= (1e9 + 7);
		}
		if (state[i + 2]) {
			pattern[i + 2] += pattern[i];
			pattern[i + 2] %= (1e9 +7);
		}
	}

	cout << pattern[n] << endl;

	return 0;
}

//1,1,2,0,2,2,4
//1,1,2,3,5,8,13,21,34,55,89
//1,0,1,1,2
