#include <bits/stdc++.h>
using namespace std;
long long n = 100002;
vector<long long> vs(n + 1, 0);
vector<long long> cr(n + 1, 0);
vector<long long> dmg(n + 1, 0);
long long strs(long long i = 0) {
  if (vs[i]) return cr[i];
  vs[i] = 1;
  if (dmg[i]) return (cr[i] = 0);
  if (i == n - 1) {
    return (cr[i] = 1);
  }
  if (i == n) {
    return (cr[i] = 1);
  }
  cr[i] = (strs(i + 1) + strs(i + 2));
  return (cr[i]);
}
int main() {
  long long m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int t;
    cin >> t;
    dmg[t] = 1;
  }
  cout << strs() % 1000000007 << endl;
  return 0;
}
