#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n, m;
  cin >> n >> m;
  vector<long long> hakai(n + 1, 1);
  for (long long i = 0; i < m; i++) {
    long long a;
    cin >> a;
    hakai[a] = 0;
  }
  long long dp[100010];
  for (long long i = 0; i < 100010; i++) {
    dp[i] = 0;
  }
  dp[0] = 1;
  for (long long i = 1; i <= n; i++) {
    if (!hakai[i]) continue;
    for (long long j = max<long long>(0, i - 2); j < i; j++) {
      dp[i] += dp[j];
    }
  }
  cout << dp[n] << endl;
}
