#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int N, M;
  cin >> N >> M;
  const long MOD = 1e9 + 7;
  auto mod = [&](long x) { return x % MOD; };
  vector<long> dp(3, 0);
  dp[0] = 1;
  int a;
  cin >> a;
  for (int i = 1; i <= N; i++) {
    if (i == a) {
      dp[i % 3] = 0;
      if (M) {
        cin >> a;
        M--;
      }
    } else {
      dp[i % 3] = dp[(i + 2) % 3] + dp[(i + 1) % 3];
    }
  }
  auto ans = dp[N % 3];
  cout << ans << endl;
  return 0;
}
