#include <bits/stdc++.h>
using namespace std;
long long dp[100005];
const int MOD = 1e9 + 7;
int main() {
  int n, m;
  cin >> n >> m;
  dp[0] = 1;
  for (int i = 0; i < (m); i++) {
    int a;
    cin >> a;
    dp[a] = -1;
  }
  for (int i = 0; i < (n); i++) {
    dp[i + 1] += (dp[i + 1] == -1 ? 0 : dp[i]);
    dp[i + 2] += (dp[i + 2] == -1 ? 0 : dp[i]);
  }
  cout << dp[n] << endl;
  return 0;
}
