#include <bits/stdc++.h>
using namespace std;
long long int dfs(vector<bool> &bv, vector<long long int> &cache, int step,
                  int n) {
  if (cache[step] != 9999) {
    return cache[step];
  }
  if (step == n) {
    cache[step] = 1;
    return 1;
  } else if (step > n) {
    cache[step] = 0;
    return 0;
  } else {
    if (bv[step]) {
      return dfs(bv, cache, step + 1, n) + dfs(bv, cache, step + 2, n);
    } else {
      cache[step] = 0;
      return 0;
    }
  }
}
int main(int argc, char const *argv[]) {
  int n, m;
  cin >> n;
  cin >> m;
  vector<bool> bv(n, true);
  vector<long long int> cache(n + 1, 9999);
  int ai;
  for (int i = 0; i < m; i++) {
    cin >> ai;
    bv[ai] = false;
  }
  long long int ans = dfs(bv, cache, 0, n);
  cout << ans;
  return 0;
}
