#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int s[10003] = {};
  s[0] = 1;
  int x = 10001;
  if (m > 0) cin >> x;
  int m_size = 1;
  for (int i = 0; i < n; i++) {
    if (i + 1 == x) {
      s[i + 2] += s[i];
      s[i + 2] = s[i + 2] % 1000000007;
      s[i + 1] = 0;
      i++;
      if (m_size < m) {
        cin >> x;
        m_size++;
        if (i + 1 == x) {
          cout << 0 << endl;
          return 0;
        }
      }
    } else {
      s[i + 1] += s[i];
      s[i + 1] = s[i + 1] % 1000000007;
      s[i + 2] += s[i];
      s[i + 2] = s[i + 2] % 1000000007;
    }
  }
  cout << s[n] << endl;
  return 0;
}
