import std.stdio;
long div = 1000000007;

long C(long m, long n) {
	long acc = 1;
	foreach(i; 0..n) {
		acc *= (m - i) / (i+1) % div;
	}
	return acc;
}

void main() {
	long n, m;
	scanf("%ld %ld\n", &n, &m);
	int[] dp = new int[n+1];
	long a;
	scanf("%ld", &a);
	foreach(i; 0..n+1) {
		if (a == i) {
			scanf("%ld", &a);
			dp[i] = 0;
		}
		else if (i >= 2) {
			dp[i] = (dp[i-1] + dp[i-2]) % div;
		}
		else {
			dp[i] = 1;
		}
	}
	dp[n].write;
}