#include <bits/stdc++.h>
int main() {
  using ull = unsigned long long;
  ull N, M;
  std::cin >> N >> M;
  std::set<ull> a;
  for (ull m = 0; m < M; m++) {
    long long at;
    std::cin >> at;
    a.insert(at);
  }
  ull p1 = 1;
  ull p2 = 0;
  ull count_all = 0;
  for (ull i = 1; i <= N; i++) {
    if (a.count(i) > 0)
      count_all = 0;
    else
      count_all = p1 + p2;
    p2 = p1;
    p1 = count_all;
  }
  std::cout << (count_all % 1000000007) << std::endl;
  return 0;
}
