#include <bits/stdc++.h>
using namespace std;
template <typename T>
void print(T x) {
  std::cout << x << '\n';
}
long long N, M;
vector<long long> a;
vector<long long> oks(100001, true);
vector<long long> f(100001);
long long k;
long long fun(long long i) {
  if (!oks[i]) {
    return 0;
  } else {
    if (i == 0) {
      f[i] = 1;
      return 1;
    }
    if (i == 1) {
      f[i] = 1;
      return 1;
    }
  }
  if (f[i] != 0) {
    return f[i];
  }
  f[i] = (fun(i - 2) + fun(i - 1)) % 1000000007;
  return f[i];
}
signed main() {
  cin >> N >> M;
  a.resize(M);
  long long temp = 0;
  for (long long i = 0; i < (M); i++) {
    cin >> temp;
    oks[temp] = false;
  }
  if (N / 2 < M) {
    cout << 0 << endl;
    return 0;
  }
  for (long long i = 0; i < (N); i++) {
    fun(i);
  }
  long long ans = fun(N);
  cout << ans << endl;
  return 0;
}
