#include <bits/stdc++.h>
int main(void) {
  int N, M, B[100000], D[100000 + 1];
  std::cin >> N >> M;
  for (int i = 0; i < N; i++) {
    B[i] = 0;
  }
  for (int i = 0; i < M; i++) {
    int ai;
    std::cin >> ai;
    B[ai] = 1;
  }
  D[0] = 1;
  D[1] = (B[1] == 1) ? 0 : 1;
  for (int i = 2; i <= N; i++) {
    if (B[i] == 1) {
      D[i] = 0;
    } else {
      long long temp = D[i - 2];
      temp += D[i - 1];
      temp %= 1000000007;
      D[i] = temp;
    }
  }
  std::cout << D[N];
  return 0;
}
