#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, M;
  int a[100001] = {0};
  uint64_t step[100001] = {0};
  cin >> N >> M;
  for (int i = 0; i < M; i++) cin >> a[i];
  int idx_broken = 0;
  step[0] = 1;
  if (a[idx_broken] == 1) {
    step[1] = 0;
    idx_broken++;
  } else {
    step[1] = 1;
  }
  if (N >= 2) {
    for (int i = 2; i <= N; i++) {
      if (a[idx_broken] == i) {
        step[i] = 0;
        idx_broken++;
      } else {
        step[i] = step[i - 1] + step[i - 2];
      }
    }
  }
  uint64_t mod = 1000000007;
  uint64_t ans = step[N] % mod;
  cout << ans << endl;
  return 0;
}
