#include <bits/stdc++.h>
const int INF = 1e9;
const int MOD = 1e9 + 7;
const long long LINF = 1e18;
using namespace std;
int n, m;
vector<long long> a;
vector<long long> memo(222, -1);
long long dp(int x) {
  long long ret = 0;
  if (memo[x] != -1) return memo[x];
  if (a[x] == 1) {
    ret = 0;
  } else if (x == 0) {
    ret = 1;
  } else if (x == 1) {
    ret = 1;
  } else {
    ret = (dp(x - 1) + dp(x - 2)) % MOD;
  }
  memo[x] = ret;
  return ret;
}
int main(int argc, char const* argv[]) {
  cin >> n >> m;
  a.resize(n + 10);
  for (int i = 0; i < (m); ++i) {
    int x;
    cin >> x;
    a[x] = 1;
  }
  cout << dp(n) << endl;
  return 0;
}
