#include <bits/stdc++.h>
using namespace std;
int counter = 0;
int vector_finder(vector<int> vec, int number) {
  auto itr = find(vec.begin(), vec.end(), number);
  size_t index = distance(vec.begin(), itr);
  if (index != vec.size()) {
    return 1;
  } else {
    return 0;
  }
}
int re(int N, int step, vector<int> a) {
  if (!vector_finder(a, step + 1) && step + 1 < N) re(N, step + 1, a);
  if (!vector_finder(a, step + 2) && step + 2 < N) re(N, step + 2, a);
  if (step == N - 1) counter++;
  return counter;
}
int main(void) {
  int N, M;
  cin >> N >> M;
  vector<int> a = vector<int>(M);
  for (int i = 0; i < M; i++) cin >> a[i];
  const long long int MAX = 1000000007;
  int step = 0;
  counter = re(N, step, a);
  cout << counter % MAX << endl;
  return 0;
}
