#include <bits/stdc++.h>
using namespace std;
long long check(int x, int &N, vector<bool> &a, vector<long long> &b) {
  if (x == N) {
    return 1;
  }
  long long y = 0;
  if (a[x + 1]) {
    if (b[x + 1] == 0) {
      b[x + 1] = check(x + 1, N, a, b);
    }
    y += b[x + 1];
  }
  if (a[x + 2]) {
    if (b[x + 2] == 0) {
      b[x + 2] = check(x + 2, N, a, b);
    }
    y += b[x + 2];
  }
  return y % 1000000007;
}
int main() {
  int N, M;
  cin >> N >> M;
  vector<bool> a(N + 2, true);
  vector<long long> b(N + 1, 0);
  for (int i = 0; i < M; i++) {
    int b;
    cin >> b;
    a[b] = false;
  }
  a[N + 1] = false;
  cout << check(0, N, a, b);
  return 0;
}
