#include <bits/stdc++.h>
using namespace std;
map<long long, long long> mp;
map<int, int> A;
long long maxk = 1e9 + 7;
long long f(long long n) {
  if (A[n]) return 0;
  if (n == 0) return 1;
  if (n == 1) return 1;
  if (mp[n]) return mp[n];
  long long k = f(n - 1) + f(n - 2);
  k = k % maxk;
  mp[n] = k;
  return k;
}
int main() {
  long long n;
  cin >> n;
  int m;
  cin >> m;
  for (int i = 0; i < m; i++) {
    int a;
    cin >> a;
    A[a] = 1;
  }
  cout << f(n) << endl;
  return 0;
}
