#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long vis[100005], re[100005];
long long f(long long x) {
  if (vis[x]) return 0;
  if (x == 1) return 1;
  if (vis[1] && !vis[2] && x == 2) return 1;
  if (x == 2) return 2;
  if (re[x]) return re[x] % mod;
  return re[x] = (f(x - 1) % mod + f(x - 2) % mod) % mod;
}
int main() {
  long long n, k;
  scanf("%lld%lld", &n, &k);
  for (long long i = 1; i <= k; i++) {
    long long x;
    scanf("%lld", &x);
    vis[x] = 1;
  }
  printf("%lld\n", f(n));
  return 0;
}
