#include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1.0);
const long long N = 1e5 + 4;
long long valid[N];
long long dp[N];
void solve() {
  long long n;
  cin >> n;
  dp[0] = 1;
  memset(valid, 1, sizeof valid);
  long long m;
  cin >> m;
  for (long long i = 0; i < m; ++i) {
    long long x;
    cin >> x;
    valid[x] = 0;
  }
  for (long long i = 0; i < n; ++i) {
    if (valid[i]) {
      dp[i] %= 1000000007;
      dp[i + 1] += dp[i];
      dp[i + 2] += dp[i];
    }
  }
  cout << dp[n] % 1000000007 << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
