#include <bits/stdc++.h>
using namespace std;
int n, m, a, s[100005], mod = 1e9 + 7;
bool b[100005];
int main() {
  cin >> n >> m;
  for (int i = 0; i < (int)(n); i++) b[i] = true;
  for (int i = 0; i < (int)(m); i++) {
    cin >> a;
    b[a] = false;
  }
  s[0] = 1;
  if (b[1]) s[1] = 1;
  for (int i = 2; i <= n; i++) {
    if (b[i - 1]) s[i] += s[i - 1];
    if (b[i - 2]) s[i] += s[i - 2];
    s[i] %= mod;
  }
  cout << s[n] << endl;
}
