#include <bits/stdc++.h>
int N, M;
std::vector<int> a;
std::map<int, long> memo;
long step(int position, int count) {
  if (position == N) {
    return 1;
  }
  if (position > N || std::binary_search(a.begin(), a.end(), position)) {
    return 0;
  }
  if (memo[position] > 0) {
    return memo[position];
  }
  memo[position] =
      step(position + 1, count + 1) + step(position + 2, count + 1);
  return memo[position];
}
int main() {
  std::cin >> N >> M;
  for (int i = 0; i < M; i += 1) {
    int ai;
    std::cin >> ai;
    a.push_back(ai);
  }
  std::cout << step(0, 0) % 1000000007 << std::endl;
  return 0;
}
