#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
int main() {
  int n, m, a;
  cin >> n >> m;
  vector<bool> broken(n + 5, false);
  for (int i = 0; i < m; i++) {
    cin >> a;
    broken[i] = true;
  }
  vector<int> dp(n + 5, 0);
  dp[0] = 1;
  for (int i = 0; i < n; i++) {
    if (!broken[i + 1]) {
      dp[i + 1] = (dp[i] + dp[i + 1]) % mod;
    }
    if (!broken[i + 2]) {
      dp[i + 2] = (dp[i] + dp[i + 2]) % mod;
    }
  }
  cout << dp[n] << endl;
  return 0;
}
