#include <bits/stdc++.h>
using namespace std;
using in6 = int64_t;
using ind = double;
using vi = vector<in6>;
using vii = vector<vi>;
using vs = vector<string>;
using pii = pair<in6, in6>;
using psi = pair<string, in6>;
using vpi = vector<pii>;
using vps = vector<psi>;
void yes() { cout << "Yes"; }
void no() { cout << "No"; }
int main() {
  ios::sync_with_stdio(false);
  in6 n, m;
  cin >> n >> m;
  vi ans(n + 1);
  ans[0] = 1;
  vector<bool> data(n + 1, true);
  in6 a;
  while (cin >> a) data[a] = false;
  for (in6 i = 1; i < (in6)(n + 1); i++) {
    if (data[i]) ans[i] += ans[i - 1];
    if (i != n && data[i + 1]) ans[i + 1] += ans[i - 1];
  }
  cout << ans[n] % 1000000007;
  cout << "\n";
}
