#include <bits/stdc++.h>
const int INF = 1e9;
const int MOD = 1e9 + 7;
const long long LINF = 1e18;
using namespace std;
vector<long long> a;
vector<long long> memo(100000, -1ll);
long long dp(int x) {
  if (x < 0) return 0ll;
  if (memo[x] != -1ll) return memo[x];
  if (a[x] == 1) {
    return memo[x] = 0ll;
  }
  if (x == 0) {
    return memo[x] = 1ll;
  }
  return memo[x] = (dp(x - 1) + dp(x - 2)) % MOD;
}
int main(int argc, char const* argv[]) {
  int n, m;
  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;
}
