#include <bits/stdc++.h>
void upstair(int *danger, int goal, long long *memo) {
  memo[0] = 1;
  memo[1] = 1 * danger[1];
  for (int i = 2; i <= goal; i++) {
    memo[i] = memo[i - 1] * danger[i] + memo[i - 2] * danger[i];
  }
}
int main() {
  long long memo[100000] = {};
  int danger[100000];
  int N, M;
  std::vector<long> a;
  std::cin >> N >> M;
  for (int i = 0; i < N + 1; i++) {
    danger[i] = 1;
  }
  for (int i = 0; i < M; i++) {
    int temp;
    std::cin >> temp;
    danger[temp] = 0;
  }
  upstair(danger, N, memo);
  std::cout << (memo[N] % 1000000007) << std::endl;
  return 0;
}
