#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;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
const long long INF = 1LL << 60;
vector<long long> dp(100100, 0);
int main() {
  int n, m;
  cin >> n >> m;
  dp[0] = 1;
  for (int i = 0; i < m; i++) {
    int a;
    cin >> a;
    dp[a] = -1;
  }
  for (int i = 0; i < n; i++) {
    if (dp[i] == -1) continue;
    if (dp[i + 1] != -1) dp[i + 1] += dp[i];
    if (dp[i + 2] != -1) dp[i + 2] += dp[i];
  }
  std::cout << (dp[n]) % (1000000007) << '\n';
}
