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