#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int mod = 1000000007;
  int n, m;
  cin >> n >> m;
  vector<bool> holes(n + 1, true);
  for (int i = 0; i < m; i++) {
    int t;
    cin >> t;
    holes[t] = false;
  }
  vector<long long int> stairs(n + 1, 0);
  stairs[0] = 1;
  stairs[1] = 1;
  for (int now = 2; now < n + 1; now += 2) {
    for (int next = now; next < min(now + 2, n + 1); next++) {
      if (holes[next]) {
        stairs[next] = (stairs[next - 1] + stairs[next - 2]) % mod;
      }
    }
  }
  cout << stairs[n] << endl;
  return 0;
}
