#include <stdio.h>
int main(void) {
    int N, M;
    if(scanf("%d%d",&N,&M)<2){exit(1);}
		short f[N+1];
		unsigned long long int fibo[N+1];
		for(int i=0;i<N+1;i++)f[i]=1;
		for(int i=0;i<M;i++){
			int num;
			if(scanf("%d",&num)<1){exit();}
			f[num]=0;
		}
		fibo[0]=fibo[1]=1;
		fibo[0]*=f[0],fibo[1]*=f[1];
		for(int i=2;i<N+1;i++){
			fibo[i]=(fibo[i-1]+fibo[i-2])*f[i];
		}
		printf("%llu\n",fibo[N]);
    return 0;
}