#include <bits/stdc++.h>
using namespace std;
int main() {
  long n, m;
  cin >> n >> m;
  long long ans[100000];
  bool hole[100000];
  for (long i = 0; i < m; i++) {
    long a;
    cin >> a;
    hole[a] = true;
  }
  long nown = 0;
  long nowans = 0;
  ans[1] = 1;
  ans[2] = 2;
  for (long i = 3; i < n; i++) {
    ans[i] = ans[i - 2] + ans[i - 1];
    if (hole[i - 1] == true) {
      ans[i] -= ans[i - 1];
    }
    if (hole[i - 2] == true) {
      ans[i] -= ans[i - 2];
    }
    if (hole[i] == true) ans[i] = 0;
  }
  ans[n] = ans[n - 1] + ans[n - 2];
  cout << ans[n] % 1000000007 << endl;
}
