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