#include <bits/stdc++.h>
using namespace std;
long long INF = 1e9;
long long dp[10001];
long long a[10001];
int main() {
  int n, m;
  cin >> n >> m;
  vector<bool> aa(n, false);
  for (int i = 0; i < (int)(m); ++i) {
    cin >> a[i];
    aa[i] = true;
  }
  for (int i = 0; i < (int)(n); ++i) dp[i] = 0;
  dp[1] = 1;
  dp[2] = 2;
  for (int i = 3; i <= n; i++) {
    if (aa[i])
      dp[i] = 0;
    else
      dp[i] = dp[i - 1] + dp[i - 2];
  }
  cout << dp[n] << endl;
}
