#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N, M;
  long long mod = 1e9 + 7;
  cin >> N >> M;
  vector<long long> hole(N, 0);
  for (long long i = 0; i < M; ++i) {
    long long a;
    cin >> a;
    hole[a] = 1;
  }
  long long dp[N + 10];
  fill(dp, dp + N + 10, 0);
  dp[0] = 1;
  for (long long i = 0; i < N + 5; i++) {
    for (long long j = 1; j <= 2; ++j) {
      if (hole[i + j])
        continue;
      else {
        dp[i + j] = dp[i + j] + dp[i];
        dp[i + j] %= mod;
      }
    }
    dp[i] %= mod;
  }
  cout << dp[N] << endl;
}
