import std.stdio, std.math, std.algorithm, std.array, std.string, std.conv, std.container, std.range;
T Read(T)() { return readln.chomp.to!(T); }
T[] Reads(T)() { return readln.split.to!(T[]); }
alias read = Read!(int);
alias reads = Reads!(int);

enum MOD = 10^^9 + 7;

void main() {
    int n, m;
    readf("%d %d\n", &n, &m);
    auto ng = new bool[100010];
    foreach (i; 0..m) {
        int a; readf("%d\n", &a);
        ng[a] = true;
    }

    auto dp = new int[n + 1];
    dp[0] = 1;
    foreach (i; 0..n) {
        int to1 = i + 1;
        if (to1 <= n && !ng[to1]) {
            dp[to1] += dp[i];
            dp[to1] %= MOD;
        }
        int to2 = i + 2;
        if (to2 <= n && !ng[to2]) {
            dp[to2] += dp[i];
            dp[to2] %= MOD;
        }
    }
    debug writeln(dp);
    writeln(dp[n]);
}