#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> dp(100001, 0);
  vector<int> broken(100001, 0);
  dp[0] = 1;
  for (int i = 0; i < m + 1; i++) {
    int tmp;
    cin >> tmp;
    broken[tmp] = 1;
  }
  for (int i = 1; i < n + 1; i++) {
    if (broken[i] != 1) {
      if (i == 1) {
        dp[1] = dp[0];
      } else {
        dp[i] = dp[i - 1] + dp[i - 2];
      }
    }
  }
  cout << dp[n] << endl;
  return 0;
}
