#include <bits/stdc++.h>
const int INF = 2e9;
using namespace std;
using Graph = vector<vector<int>>;
int main() {
  long long n, m;
  cin >> n >> m;
  vector<long long> a(n + 1);
  for (long long i = 0; i < (n + 1); ++i) a[i] = 0;
  for (long long i = 0; i < (m); ++i) {
    long long b;
    cin >> b;
    a[b] = 1;
  }
  long long dp[100100];
  dp[0] = 1;
  dp[n] = 0;
  for (long long i = 0; i < n; i++) {
    for (int j = i + 1; j <= min(n, i + 2); j++) {
      if (a[j] == 0) {
        dp[j] += dp[i];
        dp[j] %= 1000000007;
      }
    }
  }
  cout << (dp[n]) << endl;
}
