#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e+9 + 7;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> a(n + 1, true);
  long long dp[100010];
  for (int i = 0; i < (m); ++i) {
    int q;
    cin >> q;
    a[q] = false;
  }
  dp[0] = 1;
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j <= i + 2; ++j) {
      if (a[j] == true) {
        dp[j] += dp[i];
        dp[j] %= mod;
      }
    }
  }
  cout << dp[n] << endl;
}
