#include <bits/stdc++.h>
using namespace std;
int recur(vector<int>& v, int i) {
  if (v[i] != -1) return v[i];
  if (i == 0) return v[i] = 1;
  if (i == 1) return v[i] = recur(v, i - 1);
  return v[i] = recur(v, i - 1), recur(v, i - 2);
}
int main() {
  int n, m;
  vector<int> v(n, -1);
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int t;
    cin >> t;
    v[t] = 0;
  }
  cout << recur(v, n - 1) << "\n";
}
