#include <bits/stdc++.h>
using namespace std;
int N, M;
long long A[10 + 10];
long long dp[10 + 10];
int main(void) {
  cin >> N >> M;
  for (int i = 0; i < M; i++) {
    long long temp;
    cin >> temp;
    A[temp] = 1;
  }
  dp[0] = 1;
  for (int n = 1; n <= N; n++) {
    if (A[n] == 1) {
      continue;
    }
    dp[n] = dp[n - 1];
    if (2 <= n) {
      dp[n] += dp[n - 2];
    }
    dp[n] %= 1000000000 + 7;
  }
  cout << dp[N] << endl;
  return 0;
}
