#include <bits/stdc++.h>
using namespace std;
int N;
int M;
int dp[100000];
int m = 1000000007;
std::vector<int> v;
int recur(int n) {
  if (n == N) return 1;
  if (n > N) return 0;
  for (int i = 0; i < M; i++)
    if (n == v[i]) return 0;
  if (dp[n] != -1) return dp[n];
  return dp[n] = ((recur(n + 1) % m) + (recur(n + 2) % m) % m);
}
int main() {
  memset(dp, -1, sizeof(dp));
  cin >> N;
  cin >> M;
  for (int i = 0; i < M; i++) {
    int x;
    cin >> x;
    v.push_back(x);
  }
  cout << recur(0);
  return 0;
}
