#include <bits/stdc++.h>
const long long INF = 1LL << 60;
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;
}
using namespace std;
using ll = long long;
int main() {
  int n, m;
  cin >> n >> m;
  ll dp[100100];
  for (int i = 0; i < (int)(m); i++) {
    int b;
    cin >> b;
    dp[b] = -1;
  }
  dp[0] = 1;
  for (int i = 0; i < (int)(n + 1); i++) {
    if (dp[i] == -1) {
      continue;
    }
    if (dp[i + 1] != -1) {
      dp[i + 1] += dp[i];
      dp[i + 1] %= 1000000007;
    }
    if (dp[i + 2] != -1) {
      dp[i + 2] += dp[i];
      dp[i + 2] %= 1000000007;
    }
  }
  cout << dp[n] << endl;
}
