import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner stdIn=new Scanner(System.in);
		int N=stdIn.nextInt();
		int M=stdIn.nextInt();
		int a[]=new int[N+1];
		long dp[]=new long[N+3];
		int z=0;
		while(z<M){
			int b=stdIn.nextInt();
			a[b]=-1;
			z++;
		}z=3;
		dp[2]=1;
		while(z<=N+2){
			if(a[z-2]!=-1)
				dp[z]=(dp[z-1]+dp[z-2])%1000000007;
			else
				dp[z]=0;
			z++;
		}z=3;
		System.out.println(dp[N+2]);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner stdIn=new Scanner(System.in);
		int N=stdIn.nextInt();
		int M=stdIn.nextInt();
		int a[]=new int[N+1];
		long dp[]=new long[N+3];
		int z=0;
		while(z<M){
			int b=stdIn.nextInt();
			a[b]=-1;
			z++;
		}z=3;
		dp[2]=1;
		while(z<=N+2){
			if(a[z-2]!=-1)
				dp[z]=(dp[z-1]+dp[z-2])%1000000007;
			else
				dp[z]=0;
			z++;
		}z=3;
		System.out.println(dp[N+2]);
	}
} Main public static void main(String[] args){
		Scanner stdIn=new Scanner(System.in);
		int N=stdIn.nextInt();
		int M=stdIn.nextInt();
		int a[]=new int[N+1];
		long dp[]=new long[N+3];
		int z=0;
		while(z<M){
			int b=stdIn.nextInt();
			a[b]=-1;
			z++;
		}z=3;
		dp[2]=1;
		while(z<=N+2){
			if(a[z-2]!=-1)
				dp[z]=(dp[z-1]+dp[z-2])%1000000007;
			else
				dp[z]=0;
			z++;
		}z=3;
		System.out.println(dp[N+2]);
	} main {
		Scanner stdIn=new Scanner(System.in);
		int N=stdIn.nextInt();
		int M=stdIn.nextInt();
		int a[]=new int[N+1];
		long dp[]=new long[N+3];
		int z=0;
		while(z<M){
			int b=stdIn.nextInt();
			a[b]=-1;
			z++;
		}z=3;
		dp[2]=1;
		while(z<=N+2){
			if(a[z-2]!=-1)
				dp[z]=(dp[z-1]+dp[z-2])%1000000007;
			else
				dp[z]=0;
			z++;
		}z=3;
		System.out.println(dp[N+2]);
	} Scanner stdIn=new Scanner(System.in); stdIn new Scanner(System.in) int N=stdIn.nextInt(); N stdIn.nextInt() stdIn.nextInt stdIn int M=stdIn.nextInt(); M stdIn.nextInt() stdIn.nextInt stdIn int a[]=new int[N+1]; a new int[N+1] N+1 N 1 long dp[]=new long[N+3]; dp new long[N+3] N+3 N 3 int z=0; z 0 while(z<M){
			int b=stdIn.nextInt();
			a[b]=-1;
			z++;
		} z<M z M {
			int b=stdIn.nextInt();
			a[b]=-1;
			z++;
		} int b=stdIn.nextInt(); b stdIn.nextInt() stdIn.nextInt stdIn a[b]=-1 a[b] a b -1 1 z++ z z=3 z 3 dp[2]=1 dp[2] dp 2 1 while(z<=N+2){
			if(a[z-2]!=-1)
				dp[z]=(dp[z-1]+dp[z-2])%1000000007;
			else
				dp[z]=0;
			z++;
		} z<=N+2 z N+2 N 2 {
			if(a[z-2]!=-1)
				dp[z]=(dp[z-1]+dp[z-2])%1000000007;
			else
				dp[z]=0;
			z++;
		} if(a[z-2]!=-1)
				dp[z]=(dp[z-1]+dp[z-2])%1000000007;
			else
				dp[z]=0; a[z-2]!=-1 a[z-2] a z-2 z 2 -1 1 dp[z]=(dp[z-1]+dp[z-2])%1000000007 dp[z] dp z (dp[z-1]+dp[z-2])%1000000007 (dp[z-1]+dp[z-2]) dp[z-1] dp z-1 z 1 dp[z-2] dp z-2 z 2 1000000007 dp[z]=0 dp[z] dp z 0 z++ z z=3 z 3 System.out.println(dp[N+2]) System.out.println System.out System System.out dp[N+2] dp N+2 N 2 String[] args args public class Main {
	public static void main(String[] args){
		Scanner stdIn=new Scanner(System.in);
		int N=stdIn.nextInt();
		int M=stdIn.nextInt();
		int a[]=new int[N+1];
		long dp[]=new long[N+3];
		int z=0;
		while(z<M){
			int b=stdIn.nextInt();
			a[b]=-1;
			z++;
		}z=3;
		dp[2]=1;
		while(z<=N+2){
			if(a[z-2]!=-1)
				dp[z]=(dp[z-1]+dp[z-2])%1000000007;
			else
				dp[z]=0;
			z++;
		}z=3;
		System.out.println(dp[N+2]);
	}
} public class Main {
	public static void main(String[] args){
		Scanner stdIn=new Scanner(System.in);
		int N=stdIn.nextInt();
		int M=stdIn.nextInt();
		int a[]=new int[N+1];
		long dp[]=new long[N+3];
		int z=0;
		while(z<M){
			int b=stdIn.nextInt();
			a[b]=-1;
			z++;
		}z=3;
		dp[2]=1;
		while(z<=N+2){
			if(a[z-2]!=-1)
				dp[z]=(dp[z-1]+dp[z-2])%1000000007;
			else
				dp[z]=0;
			z++;
		}z=3;
		System.out.println(dp[N+2]);
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner stdIn=new Scanner(System.in);
		int N=stdIn.nextInt();
		int M=stdIn.nextInt();
		int a[]=new int[N+1];
		long dp[]=new long[N+3];
		int z=0;
		while(z<M){
			int b=stdIn.nextInt();
			a[b]=-1;
			z++;
		}z=3;
		dp[2]=1;
		while(z<=N+2){
			if(a[z-2]!=-1)
				dp[z]=(dp[z-1]+dp[z-2])%1000000007;
			else
				dp[z]=0;
			z++;
		}z=3;
		System.out.println(dp[N+2]);
	}
}