#include <bits/stdc++.h>
using namespace std;
int STEP[1000001];
int kaidan(int N) {
  int ans = 0;
  if (N == 0) return 1;
  if (N < 0)
    return 0;
  else if (STEP[N] == 0)
    return 0;
  else if (STEP[N] == 1) {
    ans = ans + kaidan(N - 1);
    ans = ans + kaidan(N - 2);
  }
  return ans;
}
int main() {
  int N, M, ANA;
  cin >> N >> M;
  for (int i = 0; i <= N; ++i) STEP[i] = 1;
  for (int i = 0; i < M; ++i) {
    cin >> ANA;
    STEP[ANA] = 0;
  }
  cout << kaidan(N);
  return 0;
}
