#include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL << 60;
const long long MOD = (1e9 + 7);
long long dp[100010];
long long gcd(long long x, long long y) { return y == 0 ? x : gcd(y, x % y); }
long long lcg(long long x, long long y) { return x * y / gcd(x, y); }
map<long long, long long> factor(long long n) {
  map<long long, long long> ans;
  long long a = 2;
  while (n >= a * a) {
    if (n % a == 0) {
      ans[a]++;
      n /= a;
    } else
      a++;
  }
  ans[n]++;
  return ans;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
int main() {
  int s, b;
  cin >> s >> b;
  map<int, bool> isBroken;
  for (int i = 0; i < (int)(s); ++i) isBroken[i] = false;
  for (int i = 0; i < (int)(b); ++i) {
    int x;
    cin >> x;
    isBroken[x] = true;
  }
  long long ans = 0;
  dp[0] = 1;
  for (int i = 1; i <= s; ++i) {
    if (!isBroken[i]) {
      dp[i] += dp[i - 1];
      if (i > 1) dp[i] += dp[i - 2];
      dp[i] % MOD;
    }
  }
  ans = dp[s] % MOD;
  cout << ans << endl;
}
