#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
bool f(string s) {
  bool ans = true;
  for (int i = 0; i < s.size() / 2; ++i) {
    if (s[i] != s[s.size() / 2 + i]) {
      ans = false;
      break;
    }
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N, M;
  cin >> N >> M;
  vector<bool> oks(N + 1, true);
  for (int i = 0; i < M; ++i) {
    int a;
    cin >> a;
    oks[a] = false;
  }
  vector<long long> dp(N + 1);
  dp[0] = 1;
  for (int now = 0; now < N; ++now) {
    for (int next = now + 1; next < min(N, now + 2); next++) {
      if (oks[next]) {
        dp[next] += dp[now];
        dp[next] %= mod;
      }
    }
  }
  cout << dp[N] << endl;
}
