#include <bits/stdc++.h>
using namespace std;
const int md = 1e9 + 7;
int main(void) {
  ios_base::sync_with_stdio(0);
  int n, k;
  cin >> n >> k;
  vector<bool> a(n, false);
  for (int i = 0; i < k; i++) {
    int x;
    cin >> x;
    a[x] = true;
  }
  long long x = 1, y = 0, z;
  if (!a[1]) y++;
  for (int i = 2; i <= n; i++) {
    z = (x + y) % md;
    if (a[i]) z = 0;
    x = y;
    y = z;
  }
  cout << z;
  return 0;
}
