#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
int main() {
  int n, m, dp[100000], t;
  cin >> n >> m;
  vector<int> x(m, 0);
  dp[0] = 1;
  dp[1] = 1;
  for (int(i) = 0; i < (m); i++) {
    cin >> t;
    dp[t] = -1;
  }
  for (int i = 2; i <= n; i++) {
    if (dp[i] != -1) {
      dp[i] = 0;
      if (dp[i - 1] != -1) dp[i] += dp[i - 1];
      if (dp[i - 2] != -1) dp[i] += dp[i - 2];
      dp[i] = dp[i] % MOD;
    }
  }
  cout << dp[n];
}
