#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using P = pair<ll, ll>;
const ll MOD = 1e9 + 7;
const ll ZER = 0;
ll dp[100100];
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> a(n, 0);
  for (int i = 0; (i) < (int)(m); i++) {
    int tmp;
    cin >> tmp;
    a[tmp] = 1;
  }
  dp[0] = 1;
  for (int i = 0; (i) < (int)(n); i++) {
    if (a[i] == 1) continue;
    if (a[i + 1] != 1) (dp[i + 1] += dp[i]) % MOD;
    if (a[i + 2] != 1) (dp[i + 2] += dp[i]) % MOD;
  }
  dp[n] %= MOD;
  cout << dp[n] << endl;
}
