#include <bits/stdc++.h>
using namespace std;
const int Mod = 1e9 + 7;
int f[100003], N, M;
bool isdanger[100003];
inline int Rd() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  return x * f;
}
inline int dg(int k) {
  if (k < 0) return 0;
  if (k == 0)
    return 1;
  else if (isdanger[k])
    return 0;
  else if (f[k])
    return f[k];
  else
    return f[k] = (dg(k - 1) + dg(k - 2)) % Mod;
}
int main() {
  N = Rd(), M = Rd();
  for (register int i = 1; i <= M; ++i) isdanger[Rd()] = true;
  printf("%d\n", dg(N));
  return 0;
}
