import std.stdio, std.string, std.conv, std.range;

void main() {
    long mod = 1_000_000_007;
    int[] tmp = readln.split.to!(int[]);
    int n = tmp[0], m = tmp[1];
    bool[] ok = true.repeat(n+2).array;
    foreach (i; 0 .. m) {
        int a = readln.chomp.to!int;
        ok[a+1] = false;
    }
    long[] dp = new long[n+2];
    dp[1] = 1;
    foreach (i; 2 .. n+2) {
        if (ok[i]) dp[i] = (dp[i-1] + dp[i-2]) % mod;
    }
    dp[n+1].writeln;
}