#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LL_INF = 0x3f3f3f3f3f3f3f3f;
const double PI = acos(-1);
int dx[4] = {1, -1, 0, 0};
int dy[4] = {0, 0, 1, -1};
long long a[100005], b[100005];
int n, k;
void solve() {
  for (int i = 2; i <= n; ++i) {
    if (a[i] == -1) continue;
    b[i] = (b[i - 1] + b[i - 2]) % 1000000007;
  }
}
int main() {
  cin >> n >> k;
  b[0] = 1;
  b[1] = 1;
  b[2] = 2;
  int x;
  for (int i = 0; i < k; ++i) {
    scanf("%d", &x);
    a[x] = -1;
  }
  if (a[1] == -1) b[1] = 0;
  solve();
  cout << b[n] << endl;
  return 0;
}
