import std.stdio;
long div = 1_000_000_007;
void main() {
	long n, m;
	scanf("%ld %ld\n", &n, &m);
	auto dp = new long[n+2];
	dp[0] = 1;
	auto check = new bool[1_0000];
	long before = -1;
	foreach(_; 0..m) {
		long a;
		scanf("%ld\n", &a);
		assert(before < a);
		before = a;
		check[a] = true;
	}
	foreach(i; 0..n) {
		if (check[i]) continue;
		dp[i+1] = (dp[i+1] + dp[i]) % div;
		dp[i+2] = (dp[i+2] + dp[i]) % div;
	}
	dp[n].write;
}
