#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
template <typename NumType>
NumType calcGCD(NumType a, NumType b) {
  if (a < b) {
    NumType tmp = a;
    a = b;
    b = tmp;
  }
  NumType r = a % b;
  while (r != 0) {
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}
template <typename NumType>
NumType cntDivisor(const NumType& num) {
  NumType cnt = 0;
  for (NumType i = 1; i * i <= num; ++i) {
    if (num % i == 0) {
      cnt++;
      if (i * i != num) cnt++;
    }
  }
  return cnt;
}
int N, M;
int a[(int)1e5];
int dp[(int)1e5][2];
int dfs(int i, int diff) {
  if (dp[i][diff - 1] >= 0) return dp[i][diff - 1];
  if (i + diff == N) {
    return 1;
  }
  if (i > N) return 0;
  if (std::binary_search(a, a + M, i)) {
    return 0;
  }
  int tmp = 0;
  tmp += dfs(i + diff, 1);
  tmp += dfs(i + diff, 2);
  return tmp;
}
int main() {
  for (int i = 0; i < 1e5; ++i) {
    for (int j = 0; j < 2; ++j) {
      dp[i][j] = -1;
    }
  }
  cin >> N >> M;
  for (int i = 0; i < M; ++i) cin >> a[i];
  std::sort(a, a + M);
  ll cnt = 0;
  cnt += dfs(0, 1);
  cnt += dfs(0, 2);
  cout << cnt % (int)(1e9 + 7);
  return 0;
}
