#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (n); i++)
using ll = long long;

int main(){
    int n, m, k;
    cin >> n >> m;
    set<int> drop;
    rep(i, m){ cin >> k; drop.insert(k);}
    vector<int> dp(n+2);
    dp[n] = 1;
    for (int i = n-1; i >= 0; i--){
        if (drop.count(i) == 1) dp[i] == 0;
        else dp[i] = (dp[i+1] + dp[i+2]) % 1000000007;
    }
    cout << d[0] << endl;
}   