#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
const vector<ll> dx = {0, 1, 0, -1}, dy = {1, 0, -1, 0};
vector<ll> fibmemo(100000);
vector<ll> a;
ll fib(ll n) {
  for (ll i = 0; i < a.size(); ++i) {
    if (n == a[i]) {
      return 0;
    }
  }
  if (n == 1) {
    return 1;
  }
  if (n == 2) {
    return 2;
  }
  if (fibmemo[n] != 0) {
    return fibmemo[n] %= 1000000007;
  }
  return fibmemo[n] = fib(n - 1) + fib(n - 2);
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll N, M;
  cin >> N >> M;
  a.resize(M);
  for (ll i = 0; i < M; ++i) {
    cin >> a[i];
  }
  cout << fib(N) << endl;
}
