#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  bool isBroken[100001];
  for (int i = 0; i <= n; i++) {
    isBroken[i] = false;
  }
  int a = 0;
  for (int i = 0; i < m; i++) {
    cin >> a;
    isBroken[a] = true;
  }
  long ans[100001];
  ans[0] = 1;
  for (int i = 0; i <= n - 1; i++) {
    if (!isBroken[i]) {
      int next1 = i + 1;
      int next2 = i + 2;
      if (next1 <= n) {
        if (!isBroken[next1]) {
          ans[next1] += ans[i];
          ans[next1] %= 1000000007;
        }
      }
      if (next2 <= n) {
        if (!isBroken[next2]) {
          ans[next2] += ans[i];
          ans[next2] %= 1000000007;
        }
      }
    }
  }
  cout << ans[n] << endl;
}
