#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  bool blocked[n + 1];
  memset(blocked, 0, sizeof blocked);
  for (int i = 0; i < k; i++) {
    int a;
    cin >> a;
    blocked[a] = true;
  }
  int ways[n + 1];
  ways[0] = 1;
  ways[1] = 1;
  for (int i = 2; i <= n; i++) {
    if (blocked[i])
      ways[i] = 0;
    else
      ways[i] = ways[i - 1] + ways[i - 2];
    ways[i] = ways[i] % 1000000007;
  }
  cout << ways[n] << endl;
}
