#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
const int mod = ((int)1e9 + 7);
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
void prime(vector<int>& v, int n) {
  for (int i = 2; i < n; i++) {
    bool fg = false;
    for (auto e : v) {
      if (i % e == 0) {
        fg = true;
      }
    }
    if (fg) {
      continue;
    }
    v.push_back(i);
  }
}
void in(vector<int>& v) {
  for (auto& i : v) {
    cin >> i;
  }
}
signed main() {
  int n, m;
  cin >> n >> m;
  vector<int> a;
  a.resize(m);
  in(a);
  int step[100001] = {1, 0};
  auto min_a = a.begin();
  for (int i = 1; i <= n; i++) {
    if (i == *min_a) {
      step[i] = 0;
      min_a++;
      continue;
    }
    step[i] += step[i - 1];
    step[i] %= mod;
    if (i >= 2) {
      step[i] += step[i - 2];
    }
    step[i] %= mod;
  }
  cout << step[n] << endl;
  return 0;
}
