#include <bits/stdc++.h>
using namespace std;
vector<long long int> a(100002);
long long int n, m;
long long int solve(long long int step) {
  if (step == n) return 1;
  if (step > n) return 0;
  if (a[step] != 0) return 0;
  long long int a1 = solve(step + 1);
  long long int a2 = solve(step + 2);
  return a1 + a2;
}
int main(int argc, char const *argv[]) {
  cin >> n >> m;
  for (long long int i = 0; i < m; i++) {
    long long int temp;
    cin >> temp;
    a[temp]++;
  }
  cout << solve(0) % 1000000007 << endl;
}
