#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7;
const int MOD = 1e9 + 7;
int main() {
  long long n, m;
  cin >> n >> m;
  long long dp[n + 1], fre[N] = {0};
  if (fre[1] == 0)
    dp[1] = 1, dp[2] = 2;
  else
    dp[1] = 0, dp[2] = 1;
  for (int i = 0; i < m; i++) {
    int a;
    cin >> a;
    fre[a] = 1;
  }
  if (fre[n]) {
    return cout << 0, 0;
  }
  for (int i = 3; i <= n; i++) {
    if (fre[i]) {
      dp[i] = 0;
      continue;
    }
    dp[i] = dp[i - 1] % MOD + dp[i - 2] % MOD;
    dp[i] = dp[i] % MOD;
  }
  cout << dp[n] % MOD << endl;
  return 0;
}
