#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, d, e;
  cin >> a >> e;
  bool b[a + 1];
  long long int c[a + 1];
  for (int i = 0; i < (int)(a + 1); ++i) c[i] = 0;
  c[0] = 1;
  for (int i = 0; i < (int)(e); ++i) {
    cin >> d;
    b[d] = false;
  }
  for (int i = 0; i < a - 1; i++) {
    if (b[i] == false) {
      continue;
    }
    c[i + 1] += c[i];
    c[i + 2] += c[i];
  }
  if (b[a - 1]) {
    c[a] += c[a - 1];
  }
  cout << c[a] % 1000000007;
}
