#include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7;
int n;
int memo[100000][2] = {0};
int step(const vector<int>& a, int i = 0) {
  if (i > n) return 0;
  if (i == n) return 1;
  if (a[i] == 1) return 0;
  if (memo[i + 1][0] == 0) {
    memo[i + 1][0] = 1;
    memo[i + 1][1] = step(a, i + 1);
  }
  if (memo[i + 2][0] == 0) {
    memo[i + 2][0] = 1;
    memo[i + 2][1] = step(a, i + 2);
  }
  return (memo[i + 1][1] % M + memo[i + 2][1] % M) % M;
}
int main() {
  int m, k;
  cin >> n >> m;
  vector<int> a(n, 0);
  for (int i = 0; i < m; i++) {
    scanf("%d", &k);
    a[k] = 1;
  }
  cout << step(a) << endl;
  return 0;
}
