#include <bits/stdc++.h>
using namespace std;
long long dp[100010], x[100000];
bool bo[100000];
signed main() {
  long long n, m;
  cin >> n >> m;
  for (long long i = 0; i < (m); i++) {
    cin >> x[i];
    bo[x[i]] = true;
  }
  dp[0] = 1;
  dp[n] = 0;
  for (long long i = 0; i < (n); i++) {
    dp[i] %= (long long)(1000000007);
    if (!bo[i + 1]) {
      dp[i + 1] += dp[i];
    }
    if (!bo[i + 2]) dp[i + 2] += dp[i];
  }
  cout << dp[n] % (long long)(1000000007) << endl;
}
