#include <bits/stdc++.h>
using namespace std;
int N;
int M;
int a[100005];
int fibonacchi(int n) {
  if (a[n] == 1) {
    return 0;
  } else {
    if (n == 1) return 1;
    if (n == 2) return fibonacchi(1) + 1;
    if (n >= 3) return fibonacchi(n - 1) + fibonacchi(n - 2);
  }
}
int main(void) {
  cin >> N >> M;
  int A;
  for (int i = 0; i < M; i++) {
    cin >> A;
    a[A] = 1;
  }
  cout << fibonacchi(N) << endl;
  return 0;
}
