#include <bits/stdc++.h>
using namespace std;
template <class T>
long long size(const T &x) {
  return x.size();
}
const int INF = ~(1 << 31);
const double pi = acos(-1);
const double EPS = 1e-9;
int n;
bool broke[100100];
long long mod = 1000000007;
long long mem[100100];
long long dp(int at) {
  if (at >= n || broke[at]) {
    return 0;
  }
  if (at == n - 1) {
    return 1;
  }
  if (mem[at] != -1) return mem[at];
  long long sm = 0;
  sm += dp(at + 1);
  sm += dp(at + 2);
  return mem[at] = (sm % mod);
}
int main() {
  cin.sync_with_stdio(false);
  memset(broke, 0, sizeof(broke));
  memset(mem, -1, sizeof(mem));
  int m;
  cin >> n >> m;
  for (long long i = (0); i < (m); i++) {
    long long a;
    cin >> a;
    a--;
    broke[a] = true;
  }
  cout << dp(0) + dp(1);
  return 0;
}
