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