#include <algorithm>
#include <iostream>
#include <vector>
#include <set>

using namespace std;
constexpr long long MOD = 1000000007;

int main(void) {
    int N, M;
    set<int> a(100010,-1);
    vector<int> dp(100010,0);
    cin >> N >> M;
    for (int i=0;i<M;i++) {
        int q;
        cin >> q;
        a.insert(q);
    }

    dp[0] = 1; dp[1] = 1;
    for (int i=2;i<=N;i++) {
        if (a.find(i) != a.end()) continue;
        dp[i] = dp[i-2] + dp[i-1];
        if (a.find(i-2) != a.end()) dp[i] -= dp[i-2];
        if (a.find(i-1) != a.end()) dp[i] -= dp[i-1];
        dp[i] %= MOD;
    }
    cout << dp[N] << endl;

    return 0;
}