#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1000000007;
const long long int INI = -1;
int n, m;
long long int a[101010];
long long int fibo(long long int x) {
  if (a[x] != INI) {
    return a[x];
  }
  a[x] = fibo(x - 1) + fibo(x - 2);
  a[x] %= MOD;
  return a[x];
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < (int)(n); i++) {
    a[i] = INI;
  }
  a[0] = a[1] = 1;
  for (int i = 0; i < (int)(m); i++) {
    int tmp;
    cin >> tmp;
    tmp--;
    a[tmp] = 0;
  }
  cout << fibo(n - 1) << endl;
  return 0;
}
