#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
template <typename NumType>
NumType calcGCD(NumType a, NumType b) {
  if (a < b) {
    NumType tmp = a;
    a = b;
    b = tmp;
  }
  NumType r = a % b;
  while (r != 0) {
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}
template <typename NumType>
NumType cntDivisor(const NumType& num) {
  NumType cnt = 0;
  for (NumType i = 1; i * i <= num; ++i) {
    if (num % i == 0) {
      cnt++;
      if (i * i != num) cnt++;
    }
  }
  return cnt;
}
class Fibonacci {
 public:
  virtual long long calc(long long x, vector<long long> y) = 0;
};
class RecursiveFibonacci : public Fibonacci {
  long long memo[10000] = {0};

 public:
  virtual long long calc(long long x, vector<long long> y);
};
long long RecursiveFibonacci::calc(long long x, vector<long long> y) {
  for (int i = 0; i < y.size(); i++) {
    if (x == y[i]) {
      return 0;
    }
  }
  if (x == 0) {
    return 0;
  } else if (x == 1) {
    return 1;
  } else if (memo[x] != 0) {
    return memo[x];
  } else {
    memo[x] = calc(x - 1, y) + calc(x - 2, y);
  }
}
int main() {
  int N, M;
  cin >> N >> M;
  N++;
  vector<long long> a(M);
  for (int i = 0; i < M; i++) {
    cin >> a[i];
    a[i]++;
  }
  RecursiveFibonacci fb;
  cout << fb.calc(N, a) % 1000000007 << endl;
}
