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