#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const double PI = 3.141592653589793238463;
using namespace std;
long long dp[(int)1e5 + 9];
bool b[(int)1e5 + 9];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int x, m, l;
  cin >> x >> m;
  for (int i = 0; i < m; i++) {
    cin >> l;
    b[l] = true;
  }
  if (!b[1]) dp[1] = 1;
  if (!b[2]) dp[2] = 2;
  for (int i = 3; i <= x; i++) {
    if (!b[i]) dp[i] = (dp[i - 1] + dp[i - 2] + mod) % mod;
  }
  cout << dp[x] << '\n';
}
