#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
template <class T>
using V = vector<T>;
using Graph = vector<vector<int>>;
using P = pair<long long, long long>;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
const long long INF = 1e18;
long long dp[100010];
signed main() {
  int n, m;
  cin >> n >> m;
  vector<int> a(m);
  for (int i = 0; i < (m); i++) cin >> a[i];
  ;
  int k = 0;
  dp[0] = 1;
  for (int i = 1; i <= n; i++) {
    if (i == a[k]) {
      k++;
      continue;
    }
    if (i == 1)
      dp[i] += dp[i - 1] % 1000000007;
    else
      dp[i] += (dp[i - 1] + dp[i - 2]) % 1000000007;
  }
  cout << dp[n] << endl;
}
