#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
long long dp[100010];
bool am[100010];
int main() {
  long long n, m;
  long long a;
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    cin >> a;
    am[a] = true;
  }
  if (!am[1]) dp[1] = 1;
  if (!am[2]) dp[2] = 1;
  for (int i = 1; i < n; ++i) {
    if (!am[i + 1]) {
      dp[i + 1] += dp[i];
    }
    if (!am[i + 2]) {
      dp[i + 2] += dp[i];
    }
  }
  cout << dp[n] % MOD << endl;
  return 0;
}
