#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  ;
  long long dp[n + 1];
  vector<bool> s(n + 1, true);
  for (int i = 0; i < m; i++) {
    int a;
    cin >> a;
    s[a] = false;
  }
  for (int i = 0; i < n + 1; i++) dp[i] = 0;
  dp[0] = 1;
  for (int i = 0; i < n + 1; i++) {
    if (s[i] == 1) {
      dp[i + 1] += dp[i];
      if (i > 0) dp[i + 1] += dp[i - 1];
    }
    dp[i + 1] %= 1000000007LL;
  }
  cout << dp[n] << endl;
}
