#include <bits/stdc++.h>
using namespace std;
int ans = 0;
int now = 0;
int N, M;
void stair(vector<int> &broken, int now) {
  if (now == N) {
    ans++;
    return;
  }
  if (now > N || broken[now] == 1) return;
  stair(broken, now + 1);
  stair(broken, now + 2);
}
int main() {
  cin >> N >> M;
  vector<int> a(M);
  for (int i = 0; i < M; i++) cin >> a[i];
  vector<int> broken(N + 1, 0);
  for (int i : a) broken[i] = 1;
  stair(broken, now);
  cout << ans << endl;
}
