#include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL << 60;
const int mod = 1e9 + 7;
int main() {
  int N, M;
  cin >> N >> M;
  vector<int> step(N + 1, true);
  for (int i = 0; i < (M); ++i) {
    int a;
    cin >> a;
    step[a] = false;
  }
  long long dp[100100];
  dp[0] = 1;
  for (int i = 0; i < (N); ++i) {
    for (int j = i + 1; j <= min(N, i + 2); ++j) {
      if (step[j]) {
        dp[j] += dp[i];
        dp[j] %= mod;
      }
    }
  }
  cout << dp[N] << endl;
  return 0;
}
