#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
bool no[100100];
int memo[100100];
int ups(int v) {
  if (v == 0) return 1;
  if (v < 1) return 0;
  if (no[v]) return 0;
  if (memo[v] != -1) return memo[v];
  return memo[v] = ups(v - 1) + ups(v - 2);
}
int main() {
  int n, m, aux;
  cin >> n >> m;
  memset(no, false, sizeof no);
  memset(memo, -1, sizeof memo);
  for (int i = 0; i < m; i++) {
    cin >> aux;
    no[aux] = true;
  }
  cout << ups(n) << endl;
  return 0;
}
