#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll N, M;
const ll prime = 1000000007;
ll dp[100010];
bool flags[100010];
int main() {
  cin >> N >> M;
  for (int i = 0; i < M; i++) {
    ll temp;
    cin >> temp;
    flags[temp] = 1;
  }
  dp[0] = 1;
  for (int i = 0; i < N; i++) {
    if (!flags[i + 1]) dp[i + 1] += dp[i];
    if (!flags[i + 2]) dp[i + 2] += dp[i];
  }
  cout << dp[N] % prime << endl;
  return 0;
}
