#include <bits/stdc++.h>
using namespace std;
int64_t n, m;
int64_t dp[10001];
int64_t stairup(int64_t x) {
  if (x < 0) return 0;
  if (dp[x] != -1) return dp[x];
  dp[x] = (stairup(x - 1) + stairup(x - 2)) % 1000000007;
  return dp[x];
}
signed main() {
  cin >> n >> m;
  fill(dp, dp + 10001, -1);
  dp[0] = 1;
  for (int64_t i = 0; i < (int64_t)(m); i++) {
    int64_t c;
    cin >> c;
    dp[c] = 0;
  }
  cout << stairup(n) << endl;
}
