#include <bits/stdc++.h>
using namespace std;
long long int n;
long long int m;
vector<long long int> a;
long long int dp[200009];
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  map<long long int, long long int> mp;
  a.resize(n);
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
    mp[a[i]] = 1;
  }
  dp[0] = 1;
  for (long long int i = 1; i <= n; i++) {
    if (mp[i] == 1) {
      dp[i] = 0;
    } else {
      if (i >= 2)
        dp[i] = dp[i - 1] + dp[i - 2];
      else {
        dp[i] = dp[i - 1];
      }
    }
  }
  cout << dp[n] << "\n";
}
