#include <bits/stdc++.h>
const long long mod = 1e9 + 7;
using namespace std;
using ll = __int64_t;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
int DX[] = {1, 1, 0, -1, -1, -1, 0, 1};
int DY[] = {0, -1, -1, -1, 0, 1, 1, 1};
bool comp(const pair<int, ll>& p1, const pair<int, ll>& p2) {
  return p1.second > p2.second;
}
void solve() {
  int n, m;
  cin >> n >> m;
  vector<bool> oks(n + 1, true);
  for (int i = 0; i < m; i++) {
    int a;
    cin >> a;
    oks[a] = false;
  }
  ll dp[100001];
  dp[0] = 1;
  for (int now = 0; now < n; now++) {
    for (int next = now + 1; next <= min(n, now + 2); next++) {
      if (oks[next]) {
        dp[next] += dp[now];
        dp[next] %= mod;
      }
    }
  }
  cout << dp[n] << endl;
}
int main() {
  solve();
  return 0;
}
