#include <bits/stdc++.h>
using ll = unsigned long long;
using namespace std;
ll cnt = 0;
int n, m;
int* a;
int* s;
void solve(int pos) {
  if (pos == n) {
    cnt++;
    return;
  } else {
    if (pos > n || s[pos] == -1) {
      return;
    } else {
      solve(pos + 1);
      solve(pos + 2);
    }
  }
}
int main(void) {
  cin >> n >> m;
  a = new int[m];
  s = new int[n + 1];
  for (int i = 0; i < m; ++i) {
    cin >> a[i];
    s[a[i]] = -1;
  }
  solve(0);
  cout << cnt % 1000000007 << endl;
  return 0;
}
