#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long INF64 = 3e18;
const unsigned long long HASHBASE = 1222827239ull;
long long dp[100001];
long long n, m;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  int q;
  for (long long i = 0; i < m; ++i) {
    cin >> q;
    dp[q] = -1;
  }
  if (dp[1] != -1) {
    dp[1] = 1;
  }
  if (dp[2] != -1) {
    dp[2] = 2;
  }
  for (long long i = 3; i <= n; ++i) {
    if (dp[i] == -1) {
      continue;
    }
    if (dp[i - 1] != -1) {
      dp[i] += dp[i - 1];
    }
    if (dp[i - 2] != -1) {
      dp[i] += dp[i - 2];
    }
    dp[i] = dp[i] % 1000000007;
  }
  cout << dp[n] << endl;
  return 0;
}
