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