#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vd = vector<double>;
using vb = vector<bool>;
using pii = pair<int, int>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<string>;
using tiii = tuple<int, int, int>;
const ll inf = 1ll << 29;
const ll mod = 1000000007;
const double eps = 1e-9;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
int N, M;
ll ans = 0;
void rec(int i, vi &a) {
  if (i == N) {
    ans++;
    ans %= mod;
    return;
  } else if (i > N) {
    return;
  }
  if (find((a).begin(), (a).end(), i + 2) != a.end() &&
      find((a).begin(), (a).end(), i + 1) != a.end()) {
    return;
  } else if (find((a).begin(), (a).end(), i + 2) != a.end()) {
    rec(i + 1, a);
  } else if (find((a).begin(), (a).end(), i + 1) != a.end()) {
    rec(i + 2, a);
  } else {
    rec(i + 1, a);
    rec(i + 2, a);
  }
}
int main() {
  cin >> N >> M;
  vi a(M + 1);
  for (int i = 0; i < (M); i++) cin >> a.at(i);
  rec(0, a);
  cout << ans << endl;
}
