#include <bits/stdc++.h>
using namespace std;
int N, M;
unsigned long long a[100000 + 3];
unsigned long long memo[100000 + 5];
unsigned long long search(long long now) {
  if (memo[now] != 1) return memo[now];
  if (now == N) return memo[now];
  if (now > N) return 0;
  memo[now] = search(now + 1) + search(now + 2);
  return memo[now];
}
int main() {
  cin.tie(0);
  cout.tie(0);
  ios::sync_with_stdio(false);
  cin >> N >> M;
  for (int i = 0; i < (int)N + 3; i++) {
    memo[i] = 1;
  }
  for (int i = 0; i < (int)M; i++) {
    cin >> a[i];
    memo[a[i]] = 0;
  }
  cout << search(0) % 1000000007 << "\n";
  return 0;
}
