#include <bits/stdc++.h>
using namespace std;
int calc(vector<int> &v, int i, int n) {
  if (i > n) return 0;
  if (i == n) return 1;
  if (v[i] == -1) return 0;
  if (v[i] == 0) v[i] = (calc(v, i + 1, n) + calc(v, i + 2, n)) % 1000000007;
  return v[i];
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> v(n + 1);
  v[n] = 1;
  for (int i = 0; i < m; i++) {
    int a;
    cin >> a;
    v[a] = -1;
  }
  int ans = calc(v, 0, n);
  cout << ans << endl;
}
