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