#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<bool> vec(n + 1, true);
  for (int i = 0; i < int(m); i++) {
    int a;
    cin >> a;
    vec.at(a) = false;
  }
  int64_t dp[100010];
  int64_t mod = 1000000007;
  dp[0] = 1;
  for (int i = 0; i < n; i++) {
    if (i + 1 <= n and vec.at(i + 1)) {
      dp[i + 1] += dp[i];
      dp[i + 1] %= mod;
    }
    if (i + 2 <= n and vec.at(i + 2)) {
      dp[i + 2] += dp[i];
      dp[i + 2] %= mod;
    }
  }
  cout << dp[n] << endl;
}
