#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;
unordered_set<long long> b;
vector<long long> f(100001);
long long fun(long long i) {
  if (b.find(i) != b.end()) {
    return 0;
  }
  if (i == 0) {
    return 1;
  }
  if (i == 1) {
    return 1;
  }
  if (f[i] != 0) {
    return f[i];
  } else {
    f[i] = (fun(i - 2) + fun(i - 1)) % 1000000007;
  }
  return f[i];
}
signed main() {
  cin >> N >> M;
  a.resize(M);
  for (long long i = 0; i < (M); i++) {
    long long temp;
    cin >> temp;
    b.insert(temp);
  }
  long long ans = fun(N);
  cout << ans << endl;
  return 0;
}
