#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n, m;
  cin >> n >> m;
  queue<long long> br;
  stack<long long> s;
  long long a[100050], b, ans = 0;
  for (long long i = 0; i < m; i++) {
    cin >> b;
    br.push(b);
  }
  a[0] = 1;
  a[1] = 1;
  if (br.front() == 1) {
    a[1] = 0;
    br.pop();
  }
  long long check = 0;
  for (long long i = 2; i < n + 1; i++) {
    if (i != br.front()) {
      a[i] = a[i - 1] + a[i - 2];
      a[i] %= 1000000007;
      check = 0;
    } else {
      check = 1;
      br.pop();
    }
    if (check == 2) {
      cout << 0 << endl;
      return 0;
    }
  }
  cout << a[n] << endl;
  return 0;
}
