#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
void add(long long &n, long long m) {
  n += m;
  if (n >= mod) {
    n -= mod;
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<long long> dp(n + 1);
  int br[100009] = {0};
  for (int i = 0; i < m; ++i) {
    int x;
    cin >> x;
    br[x] = 1;
  }
  dp[0] = 1;
  for (int i = 0; i <= n; ++i) {
    if (br[i] == 1) dp[i] = 0;
    for (int j : {1, 2}) {
      add(dp[i + j], dp[i]);
    }
  }
  cout << dp[n] << endl;
}
