#include <bits/stdc++.h>
using namespace std;
const int inf = 1012345678;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
const long long m = 1e9 + 7;
int main() {
  int N, M;
  cin >> N >> M;
  vector<int> oks(N + 1, true);
  for (int i = 0; i < M; i++) {
    int a;
    cin >> a;
    oks[a] = false;
  }
  vector<long long> dp(N + 1);
  dp[0] = 1;
  for (int now = 0; now < N; ++now) {
    for (int next = now + 1; next <= min(N, now + 2); next++) {
      if (oks[next]) {
        dp[next] += dp[now];
      }
    }
  }
  cout << dp[N] % m << endl;
}
