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