#include <bits/stdc++.h>
using namespace std;
struct edge {
  long to, cost;
};
long ans;
signed main() {
  long n, m, a[111111];
  long dp[111111] = {0};
  cin >> n >> m;
  long f[111111] = {0};
  for (long i = 0; i < m; i++) {
    cin >> a[i];
    f[a[i]] = 1;
  }
  dp[0] = 1;
  for (long i = 0; i < n - 1; i++) {
    if (!f[i + 1])
      if (i == 0) dp[i + 1] += dp[i] % 1000000007;
    if (!f[i + 2]) dp[i + 2] = (dp[i] + dp[i + 1]) % 1000000007;
  }
  cout << dp[n] << endl;
}
