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