import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);

		long x=1000000007;

		int N=sc.nextInt();

		long[] dp=new long[N+1];
		for(int i=0;i<N+1;i++) dp[i]=0L;
		dp[0]=1L;

		int M=sc.nextInt();
		for(int i=0;i<M;i++) dp[sc.nextInt()]=-1L;

		for(int i=0;i<N;i++) {
			if(dp[i]==-1) continue;
			if(dp[i+1]!=-1) dp[i+1]=(dp[i+1]+dp[i])%x;
			if(i+2<=N  && dp[i+2]!=-1) dp[i+2]=(dp[i+2]+dp[i])%x;
			
		}

		System.out.println(dp[N]%x);

		sc.close();
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);

		long x=1000000007;

		int N=sc.nextInt();

		long[] dp=new long[N+1];
		for(int i=0;i<N+1;i++) dp[i]=0L;
		dp[0]=1L;

		int M=sc.nextInt();
		for(int i=0;i<M;i++) dp[sc.nextInt()]=-1L;

		for(int i=0;i<N;i++) {
			if(dp[i]==-1) continue;
			if(dp[i+1]!=-1) dp[i+1]=(dp[i+1]+dp[i])%x;
			if(i+2<=N  && dp[i+2]!=-1) dp[i+2]=(dp[i+2]+dp[i])%x;
			
		}

		System.out.println(dp[N]%x);

		sc.close();
	}

} Main public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);

		long x=1000000007;

		int N=sc.nextInt();

		long[] dp=new long[N+1];
		for(int i=0;i<N+1;i++) dp[i]=0L;
		dp[0]=1L;

		int M=sc.nextInt();
		for(int i=0;i<M;i++) dp[sc.nextInt()]=-1L;

		for(int i=0;i<N;i++) {
			if(dp[i]==-1) continue;
			if(dp[i+1]!=-1) dp[i+1]=(dp[i+1]+dp[i])%x;
			if(i+2<=N  && dp[i+2]!=-1) dp[i+2]=(dp[i+2]+dp[i])%x;
			
		}

		System.out.println(dp[N]%x);

		sc.close();
	} main {
		Scanner sc=new Scanner(System.in);

		long x=1000000007;

		int N=sc.nextInt();

		long[] dp=new long[N+1];
		for(int i=0;i<N+1;i++) dp[i]=0L;
		dp[0]=1L;

		int M=sc.nextInt();
		for(int i=0;i<M;i++) dp[sc.nextInt()]=-1L;

		for(int i=0;i<N;i++) {
			if(dp[i]==-1) continue;
			if(dp[i+1]!=-1) dp[i+1]=(dp[i+1]+dp[i])%x;
			if(i+2<=N  && dp[i+2]!=-1) dp[i+2]=(dp[i+2]+dp[i])%x;
			
		}

		System.out.println(dp[N]%x);

		sc.close();
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) long x=1000000007; x 1000000007 int N=sc.nextInt(); N sc.nextInt() sc.nextInt sc long[] dp=new long[N+1]; dp new long[N+1] N+1 N 1 for(int i=0;i<N+1;i++) dp[i]=0L; int i=0; int i=0; i 0 i<N+1 i N+1 N 1 i++ i++ i dp[i]=0L; dp[i]=0L dp[i] dp i 0L dp[0]=1L dp[0] dp 0 1L int M=sc.nextInt(); M sc.nextInt() sc.nextInt sc for(int i=0;i<M;i++) dp[sc.nextInt()]=-1L; int i=0; int i=0; i 0 i<M i M i++ i++ i dp[sc.nextInt()]=-1L; dp[sc.nextInt()]=-1L dp[sc.nextInt()] dp sc.nextInt() sc.nextInt sc -1L 1L for(int i=0;i<N;i++) {
			if(dp[i]==-1) continue;
			if(dp[i+1]!=-1) dp[i+1]=(dp[i+1]+dp[i])%x;
			if(i+2<=N  && dp[i+2]!=-1) dp[i+2]=(dp[i+2]+dp[i])%x;
			
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			if(dp[i]==-1) continue;
			if(dp[i+1]!=-1) dp[i+1]=(dp[i+1]+dp[i])%x;
			if(i+2<=N  && dp[i+2]!=-1) dp[i+2]=(dp[i+2]+dp[i])%x;
			
		} {
			if(dp[i]==-1) continue;
			if(dp[i+1]!=-1) dp[i+1]=(dp[i+1]+dp[i])%x;
			if(i+2<=N  && dp[i+2]!=-1) dp[i+2]=(dp[i+2]+dp[i])%x;
			
		} if(dp[i]==-1) continue; dp[i]==-1 dp[i] dp i -1 1 continue; if(dp[i+1]!=-1) dp[i+1]=(dp[i+1]+dp[i])%x; dp[i+1]!=-1 dp[i+1] dp i+1 i 1 -1 1 dp[i+1]=(dp[i+1]+dp[i])%x dp[i+1] dp i+1 i 1 (dp[i+1]+dp[i])%x (dp[i+1]+dp[i]) dp[i+1] dp i+1 i 1 dp[i] dp i x if(i+2<=N  && dp[i+2]!=-1) dp[i+2]=(dp[i+2]+dp[i])%x; i+2<=N  && dp[i+2]!=-1 i+2<=N i+2 i 2 N dp[i+2]!=-1 dp[i+2] dp i+2 i 2 -1 1 dp[i+2]=(dp[i+2]+dp[i])%x dp[i+2] dp i+2 i 2 (dp[i+2]+dp[i])%x (dp[i+2]+dp[i]) dp[i+2] dp i+2 i 2 dp[i] dp i x System.out.println(dp[N]%x) System.out.println System.out System System.out dp[N]%x dp[N] dp N x sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);

		long x=1000000007;

		int N=sc.nextInt();

		long[] dp=new long[N+1];
		for(int i=0;i<N+1;i++) dp[i]=0L;
		dp[0]=1L;

		int M=sc.nextInt();
		for(int i=0;i<M;i++) dp[sc.nextInt()]=-1L;

		for(int i=0;i<N;i++) {
			if(dp[i]==-1) continue;
			if(dp[i+1]!=-1) dp[i+1]=(dp[i+1]+dp[i])%x;
			if(i+2<=N  && dp[i+2]!=-1) dp[i+2]=(dp[i+2]+dp[i])%x;
			
		}

		System.out.println(dp[N]%x);

		sc.close();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);

		long x=1000000007;

		int N=sc.nextInt();

		long[] dp=new long[N+1];
		for(int i=0;i<N+1;i++) dp[i]=0L;
		dp[0]=1L;

		int M=sc.nextInt();
		for(int i=0;i<M;i++) dp[sc.nextInt()]=-1L;

		for(int i=0;i<N;i++) {
			if(dp[i]==-1) continue;
			if(dp[i+1]!=-1) dp[i+1]=(dp[i+1]+dp[i])%x;
			if(i+2<=N  && dp[i+2]!=-1) dp[i+2]=(dp[i+2]+dp[i])%x;
			
		}

		System.out.println(dp[N]%x);

		sc.close();
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);

		long x=1000000007;

		int N=sc.nextInt();

		long[] dp=new long[N+1];
		for(int i=0;i<N+1;i++) dp[i]=0L;
		dp[0]=1L;

		int M=sc.nextInt();
		for(int i=0;i<M;i++) dp[sc.nextInt()]=-1L;

		for(int i=0;i<N;i++) {
			if(dp[i]==-1) continue;
			if(dp[i+1]!=-1) dp[i+1]=(dp[i+1]+dp[i])%x;
			if(i+2<=N  && dp[i+2]!=-1) dp[i+2]=(dp[i+2]+dp[i])%x;
			
		}

		System.out.println(dp[N]%x);

		sc.close();
	}

}
