#include <bits/stdc++.h>
using namespace std;
long long int men[10000];
long long int climb(long long int n) {
  if (n == 1) {
    return men[0];
  }
  if (n == 2) {
    return men[1];
  }
  if (men[n - 1] == -1) {
    men[n - 1] = climb(n - 1) + climb(n - 2);
    return men[n - 1];
  } else {
    return men[n - 1];
  }
}
int main() {
  ios::sync_with_stdio(false);
  int n, m;
  for (int i = 0; i < 10000; ++i) {
    men[i] = -1;
  }
  men[0] = 1;
  men[1] = 2;
  cin >> n >> m;
  while (m--) {
    int a;
    cin >> a;
    men[a - 1] = 0;
  }
  cout << climb(n) % 1000000007 << endl;
}
