#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ll N, M, a = 0, b = 1, Ans = 0, c = -1;
  cin >> N >> M;
  bool ANA = false, dame = false;
  vector<int> C(M);
  for (int i = 0; i < M; i++) {
    cin >> C[i];
    if (C[i] - c == 1) dame = true;
    c = C[i];
  }
  for (int j = 1; j < N + 1; j++) {
    if (ANA == false) {
      Ans = (a + b);
      a = b;
      b = Ans;
    } else {
      a = Ans;
      b = Ans;
      j += 2;
    }
    for (int k = 0; k < M; k++) {
      if (j == C[k]) ANA = true;
    }
  }
  if (dame == true)
    cout << "0" << endl;
  else
    cout << Ans % 1000000007 << endl;
  return 0;
}
