#include <bits/stdc++.h>
int n, m;
std::vector<int> step;
long count = 0;
void check(int i) {
  if (n == i) {
    ++count;
    return;
  }
  if (n < i) {
    return;
  }
  if (step[i] == true) return;
  check(i + 1);
  check(i + 2);
  return;
}
int main() {
  std::cin >> n >> m;
  std::vector<int> v(m + 1, 0);
  for (size_t i = 0; i < m; i++) {
    int num;
    std::cin >> num;
    v[num] = true;
  }
  step = std::move(v);
  check(0);
  std::cout << count % 1000000007;
}
