#include <bits/stdc++.h>
using namespace std;
static const int MOD = 1e9 + 7;
bool pairCompare(const pair<int, int>& firstElof,
                 const pair<int, int>& secondElof) {
  return firstElof.first > secondElof.first;
}
int main(void) {
  long long N, M;
  cin >> N >> M;
  vector<long long> a(N);
  for (int i = 0; i < N; i++) {
    a.at(i) = 1;
  }
  long long m;
  for (long long i = 0; i < M; i++) {
    cin >> m;
    a.at(m - 1) = 0;
  }
  vector<long long> S(N);
  for (long long i = 0; i < N; i++) {
    if (i == 0)
      S.at(i) = a.at(0);
    else if (i == 1)
      S.at(i) = S.at(0) + a.at(1);
    else {
      S.at(i) = (S.at(i - 1) % MOD + S.at(i - 2) % MOD) % MOD;
      S.at(i) *= a.at(i);
    }
  }
  cout << S.at(N - 1) % MOD;
  return (0);
}
