#include <bits/stdc++.h>
using namespace std;
long long int dp[100005], broken[100005], n, m;
long long int f(int idx) {
  if (broken[idx]) return 0;
  if (idx == n) return 1LL;
  if (dp[idx] != -1) return dp[idx];
  long long int res = 0;
  res = f(idx + 1);
  if (idx + 2 <= n) res += f(idx + 2);
  return dp[idx] = res;
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    int x;
    cin >> x;
    broken[x] = 1;
  }
  memset(dp, -1, sizeof(dp));
  long long int ans = f(0);
  cout << ans << "\n";
}
