#include <bits/stdc++.h>

using namespace std;

#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")

typedef long long ll;

bool broken[100'002];

int n, m;

int dp[100'0002], mod = 1000000007;


int go(int p) {
    if(p == n) {
        return 1;
    }
    if(broken[p]) return 0;

    if(dp[p] != -1) return dp[p];

    int op1 = 0, op2 = 0;

    op1 = go(p + 1) % mod;
    if(p + 1 <= n) op2 = go(p + 2) % mod;

    return dp[p] = (op1 + op2) % mod;
}



int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    memset(dp, -1, sizeof(dp));

    cin >> n >> m;

    for(int i = 0; i < m; i++) {
        int b;
        cin >> b;

        broken[b] = true;
    }

    cout << go(0) % mod << endl;

}
