#include <bits/stdc++.h>
using namespace std;
vector<long long> fib(100000, -1);
long long res(long long N, set<long long> a) {
  if (fib.at(N) != -1) return fib.at(N);
  if (a.count(N)) return fib.at(N) = 0;
  if (N == 1) return fib.at(N) = 1;
  if (N == 0) return fib.at(N) = 1;
  return fib.at(N) = (res(N - 1, a) + res(N - 2, a)) % 1000000007;
}
int main() {
  long long N, M;
  cin >> N >> M;
  set<long long> a;
  for (int i = 0; i < M; i++) {
    long long aa;
    cin >> aa;
    a.insert(aa);
  }
  cout << res(N, a) << endl;
}
