#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, M;
  vector<long long> broken(1000000), Ans(1000000);
  for (int i = 0; i < M; i++) {
    cin >> broken[i];
  }
  Ans[0] = 1;
  if (broken[0] != 1) {
    Ans[1] = 1;
  } else {
    Ans[1] = 0;
  }
  for (int j = 2; j < N + 1; j++) {
    if (!binary_search((broken).begin(), (broken).end(), j - 2)) {
      Ans[j] += Ans[j - 2];
      Ans[j] %= 1000000007;
    }
    if (!binary_search((broken).begin(), (broken).end(), j - 1)) {
      Ans[j] += Ans[j - 1];
      Ans[j] %= 1000000007;
    }
    Ans[j] %= 1000000007;
  }
  cout << Ans[N] << endl;
}
