#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
long long Step(int num);
long long cnt = 0;
int n, m;
map<int, int> hole;
vector<long long> memo(1e5 + 3, 0);
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    int temp;
    cin >> temp;
    hole[temp]++;
  }
  cnt = Step(n);
  cout << cnt % MOD << endl;
  return 0;
}
long long Step(int num) {
  if (hole.count(num)) {
    return memo.at(num) = 0;
  }
  if (num < 1) {
    return 0;
  }
  if (num == 1) {
    return memo.at(num) = 1;
  }
  if (num == 2) {
    return memo.at(num) = 2;
  }
  if (memo.at(num) != 0) {
    return memo.at(num);
  } else {
    return memo.at(num) = (Step(num - 1) % MOD + Step(num - 2) % MOD) % MOD;
  }
}
