#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = 1000000007;
ll dp[100001] = {};
int main() {
  int N, M;
  cin >> N >> M;
  for (int i = 0; i < M; ++i) {
    int tmp;
    cin >> tmp;
    dp[tmp] = -1;
  }
  dp[0] = 1;
  dp[1] = 1;
  for (int ith = 2; ith < N + 1; ++ith) {
    if (dp[ith] == -1) {
      dp[ith] = 0;
      continue;
    }
    dp[ith] = dp[ith - 1] % MOD + dp[ith - 2] % MOD;
  }
  cout << dp[N] % MOD << endl;
  return 0;
}
