#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int A = 0, B, C, D, E, F, N, M, K, sum = 0, num = 0, cnt = 1,
                next = 0;
  cin >> N >> K;
  vector<bool> issafe(N + 1, true);
  vector<long long int> DP(N + 1, 0);
  for (long long int i = 0; i < K; i++) {
    cin >> A;
    issafe[A] = false;
  }
  DP[0] = 1;
  if (issafe[1]) DP[1] = 1;
  for (long long int i = 2; i < N + 1; i++)
    if (issafe[i]) DP[i] = DP[i - 1] + DP[i - 2];
  cout << DP[N] << endl;
}
