#include <bits/stdc++.h>
using namespace std;
vector<unsigned long long> memo(100100);
unsigned long long fibonacci_recursive(int n) {
  if (n == 1 || n == 2)
    memo[n] = 1;
  else if (n >= 3) {
    if (!memo[n])
      memo[n] = fibonacci_recursive(n - 1) + fibonacci_recursive(n - 2);
  }
  return memo[n];
}
int main(void) {
  int N, M;
  int i;
  cin >> N >> M;
  vector<bool> broken(2 * M, false);
  vector<unsigned long long> res(2 * N);
  for (i = 0; i < M; i++) {
    unsigned long long a;
    cin >> a;
    broken[a] = true;
  }
  res[0] = 1;
  res[1] = broken[1] ? 0 : 1;
  for (i = 2; i <= N; i++) {
    res[i] = (broken[i] ? 0 : res[i - 1] + res[i - 2]);
  }
  cout << res[N] % (unsigned long long)(1e9 + 7) << endl;
  return 0;
}
