#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const int P = 1000000007;
const int INF = INT_MAX;
const long long int LLINF = 1LL << 60;
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  vector<bool> ok(n + 1, true);
  int a;
  for (int i = 0; i < (m); ++i) {
    cin >> a;
    ok[a] = false;
  }
  vector<long long int> dp(n + 1);
  dp[0] = 1;
  for (int now = 0; now < n; now++) {
    for (int next = now + 1; next <= min(n, now + 2); next++) {
      if (ok[next]) {
        dp[next] += dp[now];
      }
    }
  }
  cout << dp[n] % 1000000007 << endl;
  return 0;
}
