import java.util.Scanner;


public class Main{

	public static void main(String args[]){

		long MOD=1000000007L;

		Scanner sc = new Scanner(System.in);

		int n=sc.nextInt();
		int m=sc.nextInt();
		int a[]=new int[m+1];
		a[m]=100001;

		int pt=0;

		long s[]=new long[n+1];
		s[0]=1L;

		for(int i=0;i<m;++i){
			a[i]=sc.nextInt();
		}

		if(a[0]==1){s[1]=0L; ++pt;}
		else s[1]=1L;


		for(int i=2;i<n+1;++i){
			if(a[pt]==i){s[i]=0L; ++pt;}
			else s[i]=(s[i-2]+s[i-1])%MOD;
		}


		System.out.println(s[n]);
	}
} import java.util.Scanner; Scanner java.util public class Main{

	public static void main(String args[]){

		long MOD=1000000007L;

		Scanner sc = new Scanner(System.in);

		int n=sc.nextInt();
		int m=sc.nextInt();
		int a[]=new int[m+1];
		a[m]=100001;

		int pt=0;

		long s[]=new long[n+1];
		s[0]=1L;

		for(int i=0;i<m;++i){
			a[i]=sc.nextInt();
		}

		if(a[0]==1){s[1]=0L; ++pt;}
		else s[1]=1L;


		for(int i=2;i<n+1;++i){
			if(a[pt]==i){s[i]=0L; ++pt;}
			else s[i]=(s[i-2]+s[i-1])%MOD;
		}


		System.out.println(s[n]);
	}
} Main public static void main(String args[]){

		long MOD=1000000007L;

		Scanner sc = new Scanner(System.in);

		int n=sc.nextInt();
		int m=sc.nextInt();
		int a[]=new int[m+1];
		a[m]=100001;

		int pt=0;

		long s[]=new long[n+1];
		s[0]=1L;

		for(int i=0;i<m;++i){
			a[i]=sc.nextInt();
		}

		if(a[0]==1){s[1]=0L; ++pt;}
		else s[1]=1L;


		for(int i=2;i<n+1;++i){
			if(a[pt]==i){s[i]=0L; ++pt;}
			else s[i]=(s[i-2]+s[i-1])%MOD;
		}


		System.out.println(s[n]);
	} main {

		long MOD=1000000007L;

		Scanner sc = new Scanner(System.in);

		int n=sc.nextInt();
		int m=sc.nextInt();
		int a[]=new int[m+1];
		a[m]=100001;

		int pt=0;

		long s[]=new long[n+1];
		s[0]=1L;

		for(int i=0;i<m;++i){
			a[i]=sc.nextInt();
		}

		if(a[0]==1){s[1]=0L; ++pt;}
		else s[1]=1L;


		for(int i=2;i<n+1;++i){
			if(a[pt]==i){s[i]=0L; ++pt;}
			else s[i]=(s[i-2]+s[i-1])%MOD;
		}


		System.out.println(s[n]);
	} long MOD=1000000007L; MOD 1000000007L Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc int m=sc.nextInt(); m sc.nextInt() sc.nextInt sc int a[]=new int[m+1]; a new int[m+1] m+1 m 1 a[m]=100001 a[m] a m 100001 int pt=0; pt 0 long s[]=new long[n+1]; s new long[n+1] n+1 n 1 s[0]=1L s[0] s 0 1L for(int i=0;i<m;++i){
			a[i]=sc.nextInt();
		} int i=0; int i=0; i 0 i<m i m ++i ++i i {
			a[i]=sc.nextInt();
		} {
			a[i]=sc.nextInt();
		} a[i]=sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc if(a[0]==1){s[1]=0L; ++pt;}
		else s[1]=1L; a[0]==1 a[0] a 0 1 {s[1]=0L; ++pt;} s[1]=0L s[1] s 1 0L ++pt pt s[1]=1L s[1] s 1 1L for(int i=2;i<n+1;++i){
			if(a[pt]==i){s[i]=0L; ++pt;}
			else s[i]=(s[i-2]+s[i-1])%MOD;
		} int i=2; int i=2; i 2 i<n+1 i n+1 n 1 ++i ++i i {
			if(a[pt]==i){s[i]=0L; ++pt;}
			else s[i]=(s[i-2]+s[i-1])%MOD;
		} {
			if(a[pt]==i){s[i]=0L; ++pt;}
			else s[i]=(s[i-2]+s[i-1])%MOD;
		} if(a[pt]==i){s[i]=0L; ++pt;}
			else s[i]=(s[i-2]+s[i-1])%MOD; a[pt]==i a[pt] a pt i {s[i]=0L; ++pt;} s[i]=0L s[i] s i 0L ++pt pt s[i]=(s[i-2]+s[i-1])%MOD s[i] s i (s[i-2]+s[i-1])%MOD (s[i-2]+s[i-1]) s[i-2] s i-2 i 2 s[i-1] s i-1 i 1 MOD System.out.println(s[n]) System.out.println System.out System System.out s[n] s n String args[] args public class Main{

	public static void main(String args[]){

		long MOD=1000000007L;

		Scanner sc = new Scanner(System.in);

		int n=sc.nextInt();
		int m=sc.nextInt();
		int a[]=new int[m+1];
		a[m]=100001;

		int pt=0;

		long s[]=new long[n+1];
		s[0]=1L;

		for(int i=0;i<m;++i){
			a[i]=sc.nextInt();
		}

		if(a[0]==1){s[1]=0L; ++pt;}
		else s[1]=1L;


		for(int i=2;i<n+1;++i){
			if(a[pt]==i){s[i]=0L; ++pt;}
			else s[i]=(s[i-2]+s[i-1])%MOD;
		}


		System.out.println(s[n]);
	}
} public class Main{

	public static void main(String args[]){

		long MOD=1000000007L;

		Scanner sc = new Scanner(System.in);

		int n=sc.nextInt();
		int m=sc.nextInt();
		int a[]=new int[m+1];
		a[m]=100001;

		int pt=0;

		long s[]=new long[n+1];
		s[0]=1L;

		for(int i=0;i<m;++i){
			a[i]=sc.nextInt();
		}

		if(a[0]==1){s[1]=0L; ++pt;}
		else s[1]=1L;


		for(int i=2;i<n+1;++i){
			if(a[pt]==i){s[i]=0L; ++pt;}
			else s[i]=(s[i-2]+s[i-1])%MOD;
		}


		System.out.println(s[n]);
	}
} Main
import java.util.Scanner;


public class Main{

	public static void main(String args[]){

		long MOD=1000000007L;

		Scanner sc = new Scanner(System.in);

		int n=sc.nextInt();
		int m=sc.nextInt();
		int a[]=new int[m+1];
		a[m]=100001;

		int pt=0;

		long s[]=new long[n+1];
		s[0]=1L;

		for(int i=0;i<m;++i){
			a[i]=sc.nextInt();
		}

		if(a[0]==1){s[1]=0L; ++pt;}
		else s[1]=1L;


		for(int i=2;i<n+1;++i){
			if(a[pt]==i){s[i]=0L; ++pt;}
			else s[i]=(s[i-2]+s[i-1])%MOD;
		}


		System.out.println(s[n]);
	}
}