import java.io.*;
import java.math.*;
import java.util.*;
public class Main {

	public static void main(String[] args) { //Boolean markers+DP
		Scanner input = new Scanner(System.in);
		int N = input.nextInt();
		int M = input.nextInt();
		boolean[] bad = new boolean[N+1];
		long mod = (long)(1e9+7);
		long[] dp = new long[N+1];
		for (int i = 0; i < M; i++) {
			int x = input.nextInt();
			bad[x]=true;
		}
		if (N==1) System.out.println(1);
		else {
			if (!bad[1]) dp[1]=1;
			if (!bad[2]) dp[2]=dp[1]+1;
			for (int step = 3; step<=N; step++) {
				if (!bad[step]) {
					dp[step]=dp[step-1]+dp[step-2];
					dp[step]%=mod;
				} 
			}
			System.out.println(dp[N]);
		}	
	}	
} import java.io.*; io.* java import java.math.*; math.* java import java.util.*; util.* java public class Main {

	public static void main(String[] args) { //Boolean markers+DP
		Scanner input = new Scanner(System.in);
		int N = input.nextInt();
		int M = input.nextInt();
		boolean[] bad = new boolean[N+1];
		long mod = (long)(1e9+7);
		long[] dp = new long[N+1];
		for (int i = 0; i < M; i++) {
			int x = input.nextInt();
			bad[x]=true;
		}
		if (N==1) System.out.println(1);
		else {
			if (!bad[1]) dp[1]=1;
			if (!bad[2]) dp[2]=dp[1]+1;
			for (int step = 3; step<=N; step++) {
				if (!bad[step]) {
					dp[step]=dp[step-1]+dp[step-2];
					dp[step]%=mod;
				} 
			}
			System.out.println(dp[N]);
		}	
	}	
} Main public static void main(String[] args) { //Boolean markers+DP
		Scanner input = new Scanner(System.in);
		int N = input.nextInt();
		int M = input.nextInt();
		boolean[] bad = new boolean[N+1];
		long mod = (long)(1e9+7);
		long[] dp = new long[N+1];
		for (int i = 0; i < M; i++) {
			int x = input.nextInt();
			bad[x]=true;
		}
		if (N==1) System.out.println(1);
		else {
			if (!bad[1]) dp[1]=1;
			if (!bad[2]) dp[2]=dp[1]+1;
			for (int step = 3; step<=N; step++) {
				if (!bad[step]) {
					dp[step]=dp[step-1]+dp[step-2];
					dp[step]%=mod;
				} 
			}
			System.out.println(dp[N]);
		}	
	} main { //Boolean markers+DP
		Scanner input = new Scanner(System.in);
		int N = input.nextInt();
		int M = input.nextInt();
		boolean[] bad = new boolean[N+1];
		long mod = (long)(1e9+7);
		long[] dp = new long[N+1];
		for (int i = 0; i < M; i++) {
			int x = input.nextInt();
			bad[x]=true;
		}
		if (N==1) System.out.println(1);
		else {
			if (!bad[1]) dp[1]=1;
			if (!bad[2]) dp[2]=dp[1]+1;
			for (int step = 3; step<=N; step++) {
				if (!bad[step]) {
					dp[step]=dp[step-1]+dp[step-2];
					dp[step]%=mod;
				} 
			}
			System.out.println(dp[N]);
		}	
	} Scanner input = new Scanner(System.in); input new Scanner(System.in) int N = input.nextInt(); N input.nextInt() input.nextInt input int M = input.nextInt(); M input.nextInt() input.nextInt input boolean[] bad = new boolean[N+1]; bad new boolean[N+1] N+1 N 1 long mod = (long)(1e9+7); mod (long)(1e9+7) 1e9 7 long[] dp = new long[N+1]; dp new long[N+1] N+1 N 1 for (int i = 0; i < M; i++) {
			int x = input.nextInt();
			bad[x]=true;
		} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
			int x = input.nextInt();
			bad[x]=true;
		} {
			int x = input.nextInt();
			bad[x]=true;
		} int x = input.nextInt(); x input.nextInt() input.nextInt input bad[x]=true bad[x] bad x true if (N==1) System.out.println(1);
		else {
			if (!bad[1]) dp[1]=1;
			if (!bad[2]) dp[2]=dp[1]+1;
			for (int step = 3; step<=N; step++) {
				if (!bad[step]) {
					dp[step]=dp[step-1]+dp[step-2];
					dp[step]%=mod;
				} 
			}
			System.out.println(dp[N]);
		} N==1 N 1 System.out.println(1) System.out.println System.out System System.out 1 {
			if (!bad[1]) dp[1]=1;
			if (!bad[2]) dp[2]=dp[1]+1;
			for (int step = 3; step<=N; step++) {
				if (!bad[step]) {
					dp[step]=dp[step-1]+dp[step-2];
					dp[step]%=mod;
				} 
			}
			System.out.println(dp[N]);
		} if (!bad[1]) dp[1]=1; !bad[1] bad[1] bad 1 dp[1]=1 dp[1] dp 1 1 if (!bad[2]) dp[2]=dp[1]+1; !bad[2] bad[2] bad 2 dp[2]=dp[1]+1 dp[2] dp 2 dp[1]+1 dp[1] dp 1 1 for (int step = 3; step<=N; step++) {
				if (!bad[step]) {
					dp[step]=dp[step-1]+dp[step-2];
					dp[step]%=mod;
				} 
			} int step = 3; int step = 3; step 3 step<=N step N step++ step++ step {
				if (!bad[step]) {
					dp[step]=dp[step-1]+dp[step-2];
					dp[step]%=mod;
				} 
			} {
				if (!bad[step]) {
					dp[step]=dp[step-1]+dp[step-2];
					dp[step]%=mod;
				} 
			} if (!bad[step]) {
					dp[step]=dp[step-1]+dp[step-2];
					dp[step]%=mod;
				} !bad[step] bad[step] bad step {
					dp[step]=dp[step-1]+dp[step-2];
					dp[step]%=mod;
				} dp[step]=dp[step-1]+dp[step-2] dp[step] dp step dp[step-1]+dp[step-2] dp[step-1] dp step-1 step 1 dp[step-2] dp step-2 step 2 dp[step]%=mod dp[step] dp step mod System.out.println(dp[N]) System.out.println System.out System System.out dp[N] dp N String[] args args public class Main {

	public static void main(String[] args) { //Boolean markers+DP
		Scanner input = new Scanner(System.in);
		int N = input.nextInt();
		int M = input.nextInt();
		boolean[] bad = new boolean[N+1];
		long mod = (long)(1e9+7);
		long[] dp = new long[N+1];
		for (int i = 0; i < M; i++) {
			int x = input.nextInt();
			bad[x]=true;
		}
		if (N==1) System.out.println(1);
		else {
			if (!bad[1]) dp[1]=1;
			if (!bad[2]) dp[2]=dp[1]+1;
			for (int step = 3; step<=N; step++) {
				if (!bad[step]) {
					dp[step]=dp[step-1]+dp[step-2];
					dp[step]%=mod;
				} 
			}
			System.out.println(dp[N]);
		}	
	}	
} public class Main {

	public static void main(String[] args) { //Boolean markers+DP
		Scanner input = new Scanner(System.in);
		int N = input.nextInt();
		int M = input.nextInt();
		boolean[] bad = new boolean[N+1];
		long mod = (long)(1e9+7);
		long[] dp = new long[N+1];
		for (int i = 0; i < M; i++) {
			int x = input.nextInt();
			bad[x]=true;
		}
		if (N==1) System.out.println(1);
		else {
			if (!bad[1]) dp[1]=1;
			if (!bad[2]) dp[2]=dp[1]+1;
			for (int step = 3; step<=N; step++) {
				if (!bad[step]) {
					dp[step]=dp[step-1]+dp[step-2];
					dp[step]%=mod;
				} 
			}
			System.out.println(dp[N]);
		}	
	}	
} Main
import java.io.*;
import java.math.*;
import java.util.*;
public class Main {

	public static void main(String[] args) { //Boolean markers+DP
		Scanner input = new Scanner(System.in);
		int N = input.nextInt();
		int M = input.nextInt();
		boolean[] bad = new boolean[N+1];
		long mod = (long)(1e9+7);
		long[] dp = new long[N+1];
		for (int i = 0; i < M; i++) {
			int x = input.nextInt();
			bad[x]=true;
		}
		if (N==1) System.out.println(1);
		else {
			if (!bad[1]) dp[1]=1;
			if (!bad[2]) dp[2]=dp[1]+1;
			for (int step = 3; step<=N; step++) {
				if (!bad[step]) {
					dp[step]=dp[step-1]+dp[step-2];
					dp[step]%=mod;
				} 
			}
			System.out.println(dp[N]);
		}	
	}	
}