#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, l;
  bool state[100000];
  int pattern[100010];
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    state[i] = true;
  }
  pattern[0] = 1;
  for (int i = 1; i < n + 5; i++) {
    pattern[i] = 0;
  }
  for (int i = 0; i < m; i++) {
    cin >> l;
    state[l] = false;
  }
  for (int i = 0; i < n + 5; i++) {
    if (state[i + 1]) {
      pattern[i + 1] += pattern[i];
      pattern[i + 1] %= 1000000007;
    }
    if (state[i + 2]) {
      pattern[i + 2] += pattern[i];
      pattern[i + 2] %= 1000000007;
    }
  }
  cout << pattern[n] << endl;
  return 0;
}
