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