#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
ll dp[100100];
const int mod = 1000000007;
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < (m); ++i) {
    int a;
    cin >> a;
    dp[a] = -1;
  }
  dp[0] = 1;
  for (int i = 1; i <= n; i++) {
    if (dp[i] == -1) continue;
    if (dp[i - 1] != -1) {
      dp[i] += dp[i - 1] % mod;
    }
    if (i > 1 && dp[i - 2] != -1) {
      dp[i] += dp[i - 2] % mod;
    }
  }
  cout << dp[n] << endl;
  return 0;
}
