#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 10;
int main() {
  int N, M;
  cin >> N >> M;
  vector<int> v(MAX, 1);
  for (int i = 0; i < M; ++i) {
    int a;
    cin >> a;
    v[a] = 0;
  }
  vector<long long> dp(MAX);
  dp[0] = 1;
  for (int i = 0; i < N; ++i) {
    if (v[i]) {
      if (v[i + 1]) dp[i + 1] += dp[i];
      if (v[i + 2]) dp[i + 2] += dp[i];
    }
  }
  cout << dp[N] % 1000000007 << endl;
  return 0;
}
