import java.util.*;

public class Main{
	public static void main(String args[]) {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		long prime = (long)1e9 + 7;
		
		boolean[] ok = new boolean[N + 1];
		Arrays.fill(ok, true);
		for(int i = 0; i < M; i++) {
			ok[sc.nextInt()] = false;
		}
		sc.close();
		
		long stair[] = new long[N + 1];
		Arrays.fill(stair, 0);
		stair[0] = 1;
		for(int i = 0; i < N + 1; i++) {
			if(i < N)stair[i + 1] = (stair[i + 1] + ((ok[i + 1])?stair[i]:0)) % prime;
			if(i < N - 1)stair[i + 2] +=  (stair[i + 2] + ((ok[i + 2])?stair[i]:0)) % prime;
		}
		
		System.out.println(stair[N]);
	}
} import java.util.*; util.* java public class Main{
	public static void main(String args[]) {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		long prime = (long)1e9 + 7;
		
		boolean[] ok = new boolean[N + 1];
		Arrays.fill(ok, true);
		for(int i = 0; i < M; i++) {
			ok[sc.nextInt()] = false;
		}
		sc.close();
		
		long stair[] = new long[N + 1];
		Arrays.fill(stair, 0);
		stair[0] = 1;
		for(int i = 0; i < N + 1; i++) {
			if(i < N)stair[i + 1] = (stair[i + 1] + ((ok[i + 1])?stair[i]:0)) % prime;
			if(i < N - 1)stair[i + 2] +=  (stair[i + 2] + ((ok[i + 2])?stair[i]:0)) % prime;
		}
		
		System.out.println(stair[N]);
	}
} Main public static void main(String args[]) {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		long prime = (long)1e9 + 7;
		
		boolean[] ok = new boolean[N + 1];
		Arrays.fill(ok, true);
		for(int i = 0; i < M; i++) {
			ok[sc.nextInt()] = false;
		}
		sc.close();
		
		long stair[] = new long[N + 1];
		Arrays.fill(stair, 0);
		stair[0] = 1;
		for(int i = 0; i < N + 1; i++) {
			if(i < N)stair[i + 1] = (stair[i + 1] + ((ok[i + 1])?stair[i]:0)) % prime;
			if(i < N - 1)stair[i + 2] +=  (stair[i + 2] + ((ok[i + 2])?stair[i]:0)) % prime;
		}
		
		System.out.println(stair[N]);
	} main {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		long prime = (long)1e9 + 7;
		
		boolean[] ok = new boolean[N + 1];
		Arrays.fill(ok, true);
		for(int i = 0; i < M; i++) {
			ok[sc.nextInt()] = false;
		}
		sc.close();
		
		long stair[] = new long[N + 1];
		Arrays.fill(stair, 0);
		stair[0] = 1;
		for(int i = 0; i < N + 1; i++) {
			if(i < N)stair[i + 1] = (stair[i + 1] + ((ok[i + 1])?stair[i]:0)) % prime;
			if(i < N - 1)stair[i + 2] +=  (stair[i + 2] + ((ok[i + 2])?stair[i]:0)) % prime;
		}
		
		System.out.println(stair[N]);
	} 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 long prime = (long)1e9 + 7; prime (long)1e9 + 7 (long)1e9 7 boolean[] ok = new boolean[N + 1]; ok new boolean[N + 1] N + 1 N 1 Arrays.fill(ok, true) Arrays.fill Arrays ok true for(int i = 0; i < M; i++) {
			ok[sc.nextInt()] = false;
		} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
			ok[sc.nextInt()] = false;
		} {
			ok[sc.nextInt()] = false;
		} ok[sc.nextInt()] = false ok[sc.nextInt()] ok sc.nextInt() sc.nextInt sc false sc.close() sc.close sc long stair[] = new long[N + 1]; stair new long[N + 1] N + 1 N 1 Arrays.fill(stair, 0) Arrays.fill Arrays stair 0 stair[0] = 1 stair[0] stair 0 1 for(int i = 0; i < N + 1; i++) {
			if(i < N)stair[i + 1] = (stair[i + 1] + ((ok[i + 1])?stair[i]:0)) % prime;
			if(i < N - 1)stair[i + 2] +=  (stair[i + 2] + ((ok[i + 2])?stair[i]:0)) % prime;
		} int i = 0; int i = 0; i 0 i < N + 1 i N + 1 N 1 i++ i++ i {
			if(i < N)stair[i + 1] = (stair[i + 1] + ((ok[i + 1])?stair[i]:0)) % prime;
			if(i < N - 1)stair[i + 2] +=  (stair[i + 2] + ((ok[i + 2])?stair[i]:0)) % prime;
		} {
			if(i < N)stair[i + 1] = (stair[i + 1] + ((ok[i + 1])?stair[i]:0)) % prime;
			if(i < N - 1)stair[i + 2] +=  (stair[i + 2] + ((ok[i + 2])?stair[i]:0)) % prime;
		} if(i < N)stair[i + 1] = (stair[i + 1] + ((ok[i + 1])?stair[i]:0)) % prime; i < N i N stair[i + 1] = (stair[i + 1] + ((ok[i + 1])?stair[i]:0)) % prime stair[i + 1] stair i + 1 i 1 (stair[i + 1] + ((ok[i + 1])?stair[i]:0)) % prime (stair[i + 1] + ((ok[i + 1])?stair[i]:0)) stair[i + 1] stair i + 1 i 1 ((ok[i + 1])?stair[i]:0) (ok[i + 1]) ok i + 1 i 1 stair[i] stair i 0 prime if(i < N - 1)stair[i + 2] +=  (stair[i + 2] + ((ok[i + 2])?stair[i]:0)) % prime; i < N - 1 i N - 1 N 1 stair[i + 2] +=  (stair[i + 2] + ((ok[i + 2])?stair[i]:0)) % prime stair[i + 2] stair i + 2 i 2 (stair[i + 2] + ((ok[i + 2])?stair[i]:0)) % prime (stair[i + 2] + ((ok[i + 2])?stair[i]:0)) stair[i + 2] stair i + 2 i 2 ((ok[i + 2])?stair[i]:0) (ok[i + 2]) ok i + 2 i 2 stair[i] stair i 0 prime System.out.println(stair[N]) System.out.println System.out System System.out stair[N] stair N String args[] args public class Main{
	public static void main(String args[]) {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		long prime = (long)1e9 + 7;
		
		boolean[] ok = new boolean[N + 1];
		Arrays.fill(ok, true);
		for(int i = 0; i < M; i++) {
			ok[sc.nextInt()] = false;
		}
		sc.close();
		
		long stair[] = new long[N + 1];
		Arrays.fill(stair, 0);
		stair[0] = 1;
		for(int i = 0; i < N + 1; i++) {
			if(i < N)stair[i + 1] = (stair[i + 1] + ((ok[i + 1])?stair[i]:0)) % prime;
			if(i < N - 1)stair[i + 2] +=  (stair[i + 2] + ((ok[i + 2])?stair[i]:0)) % prime;
		}
		
		System.out.println(stair[N]);
	}
} public class Main{
	public static void main(String args[]) {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		long prime = (long)1e9 + 7;
		
		boolean[] ok = new boolean[N + 1];
		Arrays.fill(ok, true);
		for(int i = 0; i < M; i++) {
			ok[sc.nextInt()] = false;
		}
		sc.close();
		
		long stair[] = new long[N + 1];
		Arrays.fill(stair, 0);
		stair[0] = 1;
		for(int i = 0; i < N + 1; i++) {
			if(i < N)stair[i + 1] = (stair[i + 1] + ((ok[i + 1])?stair[i]:0)) % prime;
			if(i < N - 1)stair[i + 2] +=  (stair[i + 2] + ((ok[i + 2])?stair[i]:0)) % prime;
		}
		
		System.out.println(stair[N]);
	}
} Main
import java.util.*;

public class Main{
	public static void main(String args[]) {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		long prime = (long)1e9 + 7;
		
		boolean[] ok = new boolean[N + 1];
		Arrays.fill(ok, true);
		for(int i = 0; i < M; i++) {
			ok[sc.nextInt()] = false;
		}
		sc.close();
		
		long stair[] = new long[N + 1];
		Arrays.fill(stair, 0);
		stair[0] = 1;
		for(int i = 0; i < N + 1; i++) {
			if(i < N)stair[i + 1] = (stair[i + 1] + ((ok[i + 1])?stair[i]:0)) % prime;
			if(i < N - 1)stair[i + 2] +=  (stair[i + 2] + ((ok[i + 2])?stair[i]:0)) % prime;
		}
		
		System.out.println(stair[N]);
	}
}