#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using db = double;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
bool IsInt(double a) {
  int b = a / 1;
  if (a == b) {
    return true;
  } else {
    return false;
  }
}
bool coY() { cout << "Yes" << endl; }
bool coN() { cout << "No" << endl; }
const int mod = 1e9 + 7;
const ll INF = 1LL << 60;
int main() {
  ll n;
  ll m;
  vector<ll> dp(100100, 1);
  for (int i = (0); i < (100100); ++i) {
    dp[i] = 1;
  }
  cin >> n >> m;
  for (int i = (0); i < (m); ++i) {
    ll broken_stair;
    cin >> broken_stair;
    dp[broken_stair] = 0;
  }
  for (int i = (2); i < (n + 1); ++i) {
    if (dp[i] != 0) {
      dp[i] = dp[i - 1] + dp[i - 2];
    } else
      dp[i] = 0;
  }
  cout << dp[n] % mod << endl;
}
