#include <bits/stdc++.h>
using namespace std;

int main() {
  long long int n, m;
  cin >> n >> m;

  vector<int>a(n + 1, true);
  for (int i = 0; i < m; i++) {
    int t;
    cin >> t;
    a[t] = false;
  }

  vector<long long int>dp(n + 1);
  dp[0] = 1;

  for (int now = 0; now < n; now++) {
    for (int next = now + 1; next <= min(n, now + 2); next++) {
      if (a[next]) {
        dp[next] += dp[now];
        dp[next] %= 1000000007;
      }
    }
  }
  cout << dp[n] << endl;
}
