#include <bits/stdc++.h>
using namespace std;
int proibido[112345],resp,x,n;

int qtsmaneiras(int i){
	if(i > n)
		return -1;
	if(proibido[i])
		return -1;

	if(i == n)
		return 1;

	x = qtsmaneiras(i+1);
	if(x != -1)
		resp++;
	x = qtsmaneiras(i+2);
	if(x != -1)
		resp++;

}

int main(){

	scanf("%d %d",&n,&m);
	for(int i = 0;i < m;++i){
		scanf("%d",&x);
		proibido[x-1] = 1;
	}
	printf("%d\n",qtsmaneiras(0));
	return 0;
}