#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, M;
  vector<int> A;
  int a;
  cin >> N >> M;
  for (int i = 0; i < M; i++) {
    cin >> a;
    A.push_back(a);
  }
  long long way[101000] = {0};
  way[0] = 1;
  int nextout = 0;
  for (int w = 1; w <= N; w++) {
    if (w == A[nextout]) {
      nextout++;
      continue;
    }
    if (w == 1)
      way[w] = way[w - 1];
    else
      way[w] = way[w - 1] + way[w - 2];
    way[w] %= 1000000007;
  }
  cout << way[N] << endl;
  return 0;
}
