#include <bits/stdc++.h>
using namespace std;
const static long long MOD = 1e9 + 7;
int main() {
  long long n, m;
  cin >> n >> m;
  set<long long> a;
  long long dp[100100];
  for (long long i = 0; i < m; i++) {
    long long tmp;
    cin >> tmp;
    a.insert(tmp);
    dp[i] = 0;
  }
  dp[0] = 1;
  for (long long i = 1; i <= n; i++) {
    if (a.find(i) != a.end()) continue;
    if (a.find(i - 1) == a.end()) dp[i] += (dp[i - 1] % MOD);
    dp[i] %= MOD;
    if (i >= 2 && a.find(i - 2) == a.end()) dp[i] += (dp[i - 1] % MOD);
    dp[i] %= MOD;
  }
  cout << dp[n] % MOD << endl;
  ;
}
