#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = 1LL << 31;
const int mod = 1000000007;
int main() {
  int n, m, a = 0;
  ll dp[100010];
  cin >> n;
  for (int i = 0; i < (int)(n + 10); i++) dp[i] = 0;
  dp[0] = 1;
  cin >> m;
  for (int i = 0; i < (int)(m); i++) cin >> a;
  dp[a] = -1;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j <= min(n, i + 2); j++)
      if (dp[j] != -1) {
        if (dp[j] != -1) dp[j] += (dp[i]);
        if (dp[j] != -1) dp[j] %= mod;
      }
  }
  cout << dp[n] << endl;
}
