#include <bits/stdc++.h>
using namespace std;
int N, M;
int a[100000];
vector<bool> a_d(100001, false);
long long num[100001];
const long long dv = 1e9 + 7;
void solve() {
  num[0] = num[1] = 1;
  for (int i = 2; i <= N; i++) {
    if (!a_d[i]) {
      num[i] = num[i - 2] + num[i - 1];
    }
  }
  long long ans = num[N] % dv;
  cout << ans << endl;
}
int main() {
  cin >> N >> M;
  for (int i = 0; i < M; i++) {
    cin >> a[i];
    a_d[a[i]] = true;
  }
  solve();
  return 0;
}
