#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> cnt(n + 5);
  cnt[n] = 1;
  for (int i = 0; i < m; i++) {
    int a;
    cin >> a;
    cnt[a] = -1;
  }
  for (int i = n - 1; i >= 0; i--) {
    if (cnt[i] == -1) continue;
    cnt[i] += max(0, cnt[i + 1]) + max(0, cnt[i + 2]);
  }
  cout << cnt[0] << endl;
  return 0;
}
