#include <bits/stdc++.h>
using namespace std;
vector<int> vec;
inline long long recursive(int n) {
  auto result = find(vec.begin(), vec.end(), n);
  if (result == vec.end()) {
    if (n > 1) {
      return recursive(n - 1) + recursive(n - 2);
    } else if (n == 1 || n == 0) {
      return 1;
    }
  } else {
    return 0;
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int j = 0; j < m; j++) {
    int a;
    cin >> a;
    vec.push_back(a);
  }
  cout << recursive(n) << endl;
}
