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