#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
long long INF = 1LL << 60;
long long dp[100010] = {0};
int main(void) {
  int n;
  cin >> n;
  int m;
  cin >> m;
  bool not_broken[n + 1];
  for (long long i = (0); i <= (n); i++) {
    not_broken[i] = true;
  }
  for (long long i = (0); i < (m); i++) {
    int tmp;
    cin >> tmp;
    not_broken[tmp] = false;
  }
  dp[0] = 1;
  if (not_broken[1]) dp[1] = 1;
  for (long long i = (2); i <= (n); i++) {
    if (not_broken[i - 1]) dp[i] += dp[i - 1];
    if (not_broken[i - 2]) dp[i] += dp[i - 2];
  }
  cout << dp[n] % 1000000007 << endl;
  return 0;
}
