#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
vector<long long> dp(100001);
vector<bool> broken(100001);
long long fibo(int a) {
  if (broken.at(a)) {
    return 0;
  } else if (a == 0 || a == 1) {
    return 1;
  }
  if (dp.at(a) > 0) {
    return dp.at(a);
  }
  return dp.at(a) = (fibo(a - 1) % MOD + fibo(a - 2) % MOD) % MOD;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << setprecision(20) << fixed;
  int N, M;
  cin >> N >> M;
  for (int i = 0; i < M; i++) {
    int a;
    cin >> a;
    broken.at(a) = true;
  }
  cout << fibo(N) << endl;
}
