#include <bits/stdc++.h>
using namespace std;
long long a[100010];
bool b[100010];
int main() {
  long long n, k;
  cin >> n >> k;
  for (int i = 0; i < k; i++) {
    long long z;
    cin >> z;
    z--;
    b[z] = 1;
  }
  if (b[0] != 1) {
    a[0] = 1;
  }
  if (b[1] != 1) {
    a[1] = 2;
  }
  for (int i = 2; i < n; i++) {
    a[i] = a[i - 1] + a[i - 2];
    if (b[i] == 1) {
      a[i] = 0;
    }
  }
  cout << a[--n];
}
