#include <bits/stdc++.h>
using namespace std;
const double PI = 3.141592653589793;
const long long I_MAX = 1LL << 60;
const long long mod = 1000000007;
void precal() { return; }
bool solve() {
  long long n = 1, q;
  string s;
  if (cin >> n >> q)
    ;
  else
    return false;
  long long num;
  bool broke[n + 5];
  memset(broke, false, sizeof(broke));
  for (int i = 0; i < q; ++i) {
    cin >> num;
    broke[num] = true;
  }
  vector<long long> dp(n + 5, 0);
  dp[0] = 1;
  for (int i = 0; i <= n; ++i) {
    if (broke[i]) continue;
    dp[i + 1] += dp[i];
    dp[i + 2] += dp[i];
    dp[i] %= mod;
  }
  cout << dp[n] << '\n';
  return true;
}
int main() {
  precal();
  int t = INT_MAX;
  for (int i = 1; i <= t; ++i) {
    if (!solve()) break;
  }
  return 0;
}
