#include <bits/stdc++.h>
using namespace std;
const long long INF = 1ll << 60;
long long dp[100100] = {0};
int main(void) {
  long long n, m;
  cin >> n >> m;
  vector<int> a(m);
  for (int i = 0; i < m; i++) {
    cin >> a[i];
  }
  vector<bool> broken(n);
  for (int i = 0; i < n; i++) {
    broken[i] = false;
  }
  for (int i = 0; i < m; i++) {
    broken[a[i]] = true;
  }
  dp[0] = 1;
  for (int i = 0; i < n; i++) {
    if (!broken[i]) {
      dp[i + 1] += dp[i];
      dp[i + 2] += dp[i];
    }
  }
  long long mod = 1e9 + 7;
  long long ans = dp[n] % mod;
  cout << ans << endl;
}
