#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m;
  cin >> n >> m;
  vector<long long int> a(m);
  for (int i = 0; i < m; i++) cin >> a[i];
  vector<int> safe;
  safe.assign(n + 1, 1);
  for (int i = 0; i < m; i++) safe[a[i]] = 0;
  long long int sum(0);
  queue<long long int> que;
  que.push(0);
  while (que.size()) {
    long long int pos = que.front();
    que.pop();
    if (pos == n) sum++;
    for (long long int add = 1; add <= 2; add++) {
      long long int pos2 = pos + add;
      if (safe[pos2] == 1) que.push(pos2);
    }
  }
  cout << sum % 1000000007 << endl;
  return 0;
}
