#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
int n, m;
vector<bool> a;
int cnt = 0;
void rec(int idx) {
  if (idx == n) {
    cnt++;
    cnt = cnt % INF;
    return;
  }
  if (!a[idx + 1]) rec(idx + 1);
  if (!a[idx + 2]) rec(idx + 2);
}
int main() {
  cin >> n >> m;
  a = vector<bool>(n + 1, false);
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    a[x] = true;
  }
  rec(0);
  cout << cnt;
}
