#include <bits/stdc++.h>
using namespace std;
int main() {
  queue<int> kaidan;
  int n, m;
  unsigned int a;
  int ans, count = 0, now;
  cin >> n >> m;
  int* zyotai = new int[n + 3];
  for (int i = 0; i < n + 3; i++) {
    zyotai[i] = 0;
  }
  for (int i = 0; i < m; i++) {
    cin >> a;
    zyotai[a] = -1;
  }
  kaidan.push(0);
  while (kaidan.empty() == false) {
    now = kaidan.front();
    if (now == n) {
      count++;
      kaidan.pop();
      continue;
    } else if (now > n) {
      kaidan.pop();
      continue;
    }
    if (zyotai[now + 1] == 0) {
      kaidan.push(now + 1);
    }
    if (zyotai[now + 2] == 0) {
      kaidan.push(now + 2);
    }
    kaidan.pop();
  }
  ans = count % 1000000007;
  cout << ans << endl;
  return 0;
}
