#include <bits/stdc++.h>
int N, M;
long memo[100001];
long step(int position) {
  if (memo[position] >= 0) {
    return memo[position];
  }
  memo[position] = step(position + 1) + step(position + 2);
  return memo[position];
}
int main() {
  std::cin >> N >> M;
  for (int i = 0; i < N; i += 1) {
    memo[i] = -1;
  }
  for (int i = 0; i < M; i += 1) {
    int ai;
    std::cin >> ai;
    memo[ai] = 0;
  }
  memo[N] = 1;
  memo[N + 1] = 0;
  std::cout << step(0) % 1000000007 << std::endl;
  return 0;
}
