#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1e9 + 1;
ll MOD = 1e9 + 7;
ll dx[9] = {-1, -1, -1, 0, 0, 0, 1, 1, 1};
ll dy[9] = {-1, 0, 1, -1, 0, 1, -1, 0, 1};
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll dp[100001];
  for (int i = (int)0; i < (int)100001; ++i) {
    dp[i] = 0;
  }
  dp[0] = 1;
  int N, M;
  cin >> N >> M;
  map<int, bool> br;
  for (int i = (int)0; i < (int)M; ++i) {
    int a;
    cin >> a;
    br[a] = true;
  }
  for (int i = (int)0; i < (int)N; ++i) {
    if (br[i] == false) {
      if (br[i + 1] == false) {
        dp[i + 1] += dp[i];
      }
      if (br[i + 2] == false && i + 2 <= N) {
        dp[i + 2] += dp[i];
      }
    }
  }
  cout << dp[N] % MOD << endl;
  return 0;
}
