#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) {
  if (x < y) swap(x, y);
  while (y > 0) {
    int r = x % y;
    x = y;
    y = r;
  }
  return x;
}
int sum = 0;
void steps(int j, int *a, int n) {
  int flag = 0;
  int m = sizeof(a) / sizeof(a[0]);
  for (int i = 0; i < m; i++) {
    if (j == a[i]) {
      flag = 1;
    }
  }
  if (j >= n) {
    if (j == n) {
      sum = (sum + 1) % 1000000007;
    } else {
    }
  } else {
    if (flag == 0) {
      steps(j + 1, a, n);
      steps(j + 2, a, n);
    }
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  int a[m];
  for (int i = 0; i < m; i++) {
    cin >> a[i];
  }
  steps(0, a, n);
  cout << sum << endl;
  return 0;
}
