#include <bits/stdc++.h>
using namespace std;
long long* a;
vector<vector<long long>> comb(int n, int r) {
  vector<vector<long long>> v(n + 1, vector<long long>(n + 1, 0));
  for (int i = 0; i < v.size(); i++) {
    v[i][0] = 1;
    v[i][i] = 1;
  }
  for (int j = 1; j < v.size(); j++) {
    for (int k = 1; k < j; k++) {
      v[j][k] = (v[j - 1][k - 1] + v[j - 1][k]);
    }
  }
  return v;
}
long long fib(int x) {
  if (a[x] == -1)
    return fib(x - 1) + fib(x - 2);
  else
    return a[x];
}
int main() {
  int n, m;
  cin >> n >> m;
  a = new long long[n + 1];
  a[0] = 1;
  a[1] = 1;
  for (int i = 2; i < n + 1; i++) {
    a[i] = -1;
  }
  for (int i = 0; i < m; i++) {
    long long t;
    cin >> t;
    a[t] = false;
  }
  cout << fib(n) << endl;
}
