#include <bits/stdc++.h>
using namespace std;
double PI = acos(-1);
long long int mod = 1e9 + 7;
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  return a * b / gcd(a, b);
}
long double chg_DegRad(long double deg) { return deg * PI / 180.0; }
long double chg_RadDeg(long double rad) { return rad * 180.0 / PI; }
long long int CountDigit(long long int n) {
  long long int digit = 1;
  while ((n /= 10) != 0) digit++;
  return digit;
}
double dis(double xa, double ya, double xb, double yb) {
  return pow(pow(xa - xb, 2.0) + pow(ya - yb, 2.0), 0.5);
}
long long int n, m, a[100100], j;
bool J[100100];
int main() {
  cin >> n >> m;
  for (long long int i = (long long int)(0); i < (long long int)(n + 1); i++)
    J[i] = true;
  for (long long int i = (long long int)(0); i < (long long int)(m); i++) {
    cin >> j;
    J[j] = false;
  }
  a[0] = 1;
  if (J[1])
    a[1] = 1;
  else
    a[1] = 0;
  for (long long int i = (long long int)(2); i < (long long int)(n + 1); i++) {
    if (J[i])
      a[i] = a[i - 1] + a[i - 2];
    else
      a[i] = 0;
  }
  cout << a[n] % mod << endl;
  return 0;
}
