#include <bits/stdc++.h>
const long long LL_MAX(1LL << 60);
using namespace std;
const long long MOD(1000000007);
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long n, m;
  cin >> n >> m;
  vector<bool> broken(n, false);
  for (long long i = (0); i < (m + 1); i++) {
    long long x;
    cin >> x, broken[x] = true;
  }
  vector<long long> dp(n + 10);
  dp[0] = 1;
  for (long long i = (0); i < (n); i++) {
    if (!broken[i + 1]) dp[i + 1] += dp[i], dp[i + 1] = dp[i + 1] % MOD;
    if (!broken[i + 2]) dp[i + 2] += dp[i], dp[i + 2] = dp[i + 2] % MOD;
  }
  cout << dp[n] << endl;
  return 0;
}
