#include <bits/stdc++.h>
using namespace std;
vector<int> S(10001);
int rec(int i) {
  if (i == 0) return 1;
  if (i < 0) return 0;
  if (S[i] != 0) return S[i];
  if (S[i - 1] != 1e9) {
    S[i] = (S[i] + rec(i - 1)) % 1000000007;
  }
  if (S[i - 2] != 1e9) {
    S[i] = (S[i] + rec(i - 2)) % 1000000007;
  }
  return S[i] % 1000000007;
}
int main() {
  int N, M;
  cin >> N >> M;
  for (int(i) = 0; (i) < (M); (i)++) {
    int t;
    cin >> t;
    S[t] = 1e9;
  }
  rec(N);
  cout << S[N] << endl;
}
