#include <bits/stdc++.h>
using namespace std;
int ope(int s, int t) { return s + t; }
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> data;
  vector<int> num;
  if (m != 0) {
    for (int i = 0; i < m; i++) {
      int a;
      cin >> a;
      data.push_back(a);
    }
  }
  for (int i = 0; i <= n; i++) {
    if (i == 0) {
      num.push_back(1);
    }
    if (i == 1) {
      if (data[0] == 1) {
        num.push_back(0);
      } else {
        num.push_back(1);
      }
    }
    if (i >= 2) {
      int k = ope(num[i - 2], num[i - 1]);
      if (m != 0) {
        for (int j = 0; j < m; j++) {
          if (data[j] == i) {
            k = 0;
          }
        }
      }
      num.push_back(k);
    }
  }
  cout << num[n] % 1000000007 << endl;
}
