#include <bits/stdc++.h>
using namespace std;
const long NUM = 1000000007;
int main() {
  int n, m;
  cin >> n >> m;
  vector<bool> ok(n + 1, true);
  for (int i = 0; i < m; ++i) {
    int input;
    cin >> input;
    ok[input] = false;
  }
  vector<long> dp(n + 1);
  dp[0] = 1;
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < min(i + 2, n); ++j) {
      if (ok[j]) dp[j] += dp[i];
    }
  }
  cout << dp[n] % NUM << endl;
}
