#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p, a[100];
  long long int b[100];
  a[0] = 1;
  a[1] = 1;
  std::cin >> n >> p;
  int l, r, total = 0;
  for (int i = 0; i < (int)(p); i++) {
    std::cin >> a[i];
  }
  int m = 0;
  for (int i = 0; i < (int)(n + 1); i++) {
    if (i == a[m]) {
      b[i] = 0;
      m++;
    } else if (i < 2) {
      b[i] = 1;
    } else {
      b[i] = (b[i - 1] + b[i - 2]) % 1000000007;
    }
  }
  cout << b[n] << endl;
}
