#include <bits/stdc++.h>
using namespace std;
bool A[100100] = {false};
long long B[100100] = {0};
long long sum(int N, int dan) {
  if (dan > N || A[dan]) return 0;
  if (dan == N) return 1;
  if (B[dan] != 0) return B[dan];
  long long X = sum(N, dan + 1);
  long long Y = sum(N, dan + 2);
  if (B[dan] == 0) B[dan] = X + Y;
  return X + Y;
}
int main() {
  int N, M;
  cin >> N >> M;
  for (long long i = 0; i < M; ++i) {
    int X;
    cin >> X;
    A[X] = true;
  }
  cout << sum(N, 0) % 1000000007 << endl;
}
