#include <bits/stdc++.h>
using namespace std;
static const long long maxLL = (long long)1 << 62;
const long long MOD = 1000000007;
const long long INF = 1e18;
const double PI = 3.14159265359;
long long ca[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
signed main() {
  long long n, m;
  vector<long long> list(105, -1);
  bool flag[100005];
  long long dp[100005];
  memset(dp, 0, sizeof(dp));
  memset(flag, false, sizeof(flag));
  cin >> n >> m;
  for (long long i = 0; i < m; i++) {
    cin >> list[i];
    flag[list[i]] = true;
  }
  dp[0] = 1;
  if (flag[1] == false) {
    dp[1] = 1;
  } else {
    dp[1] = 0;
  }
  for (long long i = 2; i <= n + 1; i++) {
    if (flag[i] == false) dp[i] += dp[i - 1];
    if (flag[i] == false) dp[i] += dp[i - 2];
    dp[i] %= MOD;
  }
  for (long long i = 0; i <= n + 1; i++) {
  }
  cout << dp[n] << endl;
  getchar();
  getchar();
  return 0;
}
