#include <bits/stdc++.h>
using namespace std;
const long DIVIDE = 1e9 + 7;
int sum_digits(int num);
template <class T>
vector<T> copy_vector(vector<T> vec);
int gcd(int a, int b);
template <class T, class U>
void print_pairs(const vector<pair<T, U>> pairs);
template <class K, class V>
void print_map(const map<K, V> m);
int main() {
  int n, m;
  cin >> n >> m;
  vector<long> floors(n + 1, 0);
  vector<bool> dropped(n + 1, false);
  for (int i = 0; i < m; i++) {
    int a;
    cin >> a;
    dropped[a] = true;
  }
  floors[1] = (dropped[1]) ? 0 : 1;
  if (n >= 2) {
    floors[2] = (dropped[2]) ? 0 : floors[1] + 1;
    for (int i = 3; i <= n; i++) {
      if (dropped[i])
        continue;
      else {
        long one_step = floors[i - 1];
        long two_step = floors[i - 2];
        floors[i] = one_step + two_step;
      }
    }
  }
  cout << floors[n] % DIVIDE << endl;
  return 0;
}
int sum_digits(int num) {
  int rtn = 0;
  while (num != 0) {
    int tmp = num % 10;
    rtn += tmp;
    num /= 10;
  }
  return rtn;
}
template <class T>
vector<T> copy_vector(vector<T> vec) {
  vector<T> rtn;
  rtn.reserve(vec.size());
  copy(vec.begin(), vec.end(), back_inserter(rtn));
  return rtn;
}
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
template <class T, class U>
void print_pairs(const vector<pair<T, U>> &pairs) {
  for (int i = 0; i < pairs.size(); i++) {
    cout << "(" << pairs[i].first << ", " << pairs[i].second << ")"
         << " ";
  }
  cout << endl;
}
template <class K, class V>
void print_map(const map<K, V> &m) {
  for (auto it = m.cbegin(); it != m.cend(); it++) {
    cout << it->first << ": " << it->second << endl;
  }
}
