#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> a(m);
  for (int i = 0; i < m; i++) {
    cin >> a.at(i);
  }
  long long dp[100100];
  dp[0] = 1;
  for (int i = 0; i < m; i++) {
    dp[a.at(i)] = -1;
  }
  for (int i = 0; i < n; i++) {
    if (dp[i] < 0) continue;
    if (dp[i + 1] >= 0) {
      dp[i + 1] += dp[i];
      dp[i + 1] %= INF;
    }
    if (dp[i + 2] >= 0) {
      dp[i + 2] += dp[i];
      dp[i + 2] %= INF;
    }
  }
  cout << (dp[n] < 0 ? 0 : dp[n]) << endl;
}
