#include <bits/stdc++.h>
using namespace std;
bool t = false;
const int MOD = 1e9 + 7;
int n, m;
int memo[(int)1e5 + 1];
vector<int> b;
int f(int pos, int bps = 0) {
  if (pos > b[bps] && !t) bps++;
  if (bps == (int)b.size()) t = true;
  bps--;
  if (pos == b[bps]) return 0;
  if (pos > n) return 0;
  if (pos == n) return 1;
  if (memo[pos] != -1) return memo[pos];
  int w = 0;
  w += f(pos + 1, bps) + f(pos + 2, bps);
  if (w >= MOD) w -= MOD;
  memo[pos] = w;
  return memo[pos];
}
int main() {
  memset(memo, -1, sizeof(memo));
  cin >> n >> m;
  b = vector<int>(m);
  for (int &i : b) cin >> i;
  sort(b.begin(), b.end());
  cout << f(0) << "\n";
  return 0;
}
