#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using P = pair<int, int>;
int main() {
  int n, m;
  cin >> n >> m;
  std::vector<int> a(m);
  for (auto& i : a) std::cin >> i;
  ;
  int dp[n + 1];
  int mod = 1e9 + 7;
  for (int i = 0; (i) < (int)(n + 1); i++) dp[i] = 0;
  dp[0] = 1;
  for (int i = (int)(1); (i) <= (int)(n); i++) {
    if (i == *lower_bound((a).begin(), (a).end(), i))
      continue;
    else
      dp[i] += dp[i - 1];
    if (i > 1) {
      if (a.size()) {
        if (i == *lower_bound((a).begin(), (a).end(), i)) {
          continue;
        } else {
          dp[i] += dp[i - 2];
        }
      } else {
        dp[i] += dp[i - 2];
      }
    }
    dp[i] %= mod;
  }
  cout << dp[n];
}
