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