#include <bits/stdc++.h>
using lint = int64_t;
using namespace std;
const lint mod = 1e9 + 7;
int main() {
  int N, M;
  lint dp[100010] = {};
  cin >> N >> M;
  for (int i = 0; i < M; i++) {
    int a;
    cin >> a;
    dp[a] = -1;
  }
  dp[0] = 1;
  dp[1] = 1;
  for (int i = 2; i <= N; i++) {
    if (dp[i] == -1) continue;
    dp[i] = max((lint)0, dp[i - 1]) + max((lint)0, dp[i - 2]);
    dp[i] %= mod;
  }
  cout << max((lint)0, dp[N]) << endl;
  return 0;
}
