import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		if (N==1) {
			System.out.println(1);
			return ;
		}
		int M = sc.nextInt();
		Set<Integer> set = new HashSet<Integer>();
		for (int i=0;i<M;i++) {
			set.add(sc.nextInt());
		}
		long A[]= new long[N];
		A[0]=1;
		if (set.contains(1)==false) {
			A[1]=1;
		}
		for(int i=2;i<N;i++) {
			if (set.contains(i)==false) {
				A[i]=(A[i-1]+A[i-2])%1000000007;
			}
		}
		System.out.println((A[N-1]+A[N-2])%1000000007);
	}
} import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		if (N==1) {
			System.out.println(1);
			return ;
		}
		int M = sc.nextInt();
		Set<Integer> set = new HashSet<Integer>();
		for (int i=0;i<M;i++) {
			set.add(sc.nextInt());
		}
		long A[]= new long[N];
		A[0]=1;
		if (set.contains(1)==false) {
			A[1]=1;
		}
		for(int i=2;i<N;i++) {
			if (set.contains(i)==false) {
				A[i]=(A[i-1]+A[i-2])%1000000007;
			}
		}
		System.out.println((A[N-1]+A[N-2])%1000000007);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		if (N==1) {
			System.out.println(1);
			return ;
		}
		int M = sc.nextInt();
		Set<Integer> set = new HashSet<Integer>();
		for (int i=0;i<M;i++) {
			set.add(sc.nextInt());
		}
		long A[]= new long[N];
		A[0]=1;
		if (set.contains(1)==false) {
			A[1]=1;
		}
		for(int i=2;i<N;i++) {
			if (set.contains(i)==false) {
				A[i]=(A[i-1]+A[i-2])%1000000007;
			}
		}
		System.out.println((A[N-1]+A[N-2])%1000000007);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		if (N==1) {
			System.out.println(1);
			return ;
		}
		int M = sc.nextInt();
		Set<Integer> set = new HashSet<Integer>();
		for (int i=0;i<M;i++) {
			set.add(sc.nextInt());
		}
		long A[]= new long[N];
		A[0]=1;
		if (set.contains(1)==false) {
			A[1]=1;
		}
		for(int i=2;i<N;i++) {
			if (set.contains(i)==false) {
				A[i]=(A[i-1]+A[i-2])%1000000007;
			}
		}
		System.out.println((A[N-1]+A[N-2])%1000000007);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc if (N==1) {
			System.out.println(1);
			return ;
		} N==1 N 1 {
			System.out.println(1);
			return ;
		} System.out.println(1) System.out.println System.out System System.out 1 return ; int M = sc.nextInt(); M sc.nextInt() sc.nextInt sc Set<Integer> set = new HashSet<Integer>(); set new HashSet<Integer>() for (int i=0;i<M;i++) {
			set.add(sc.nextInt());
		} int i=0; int i=0; i 0 i<M i M i++ i++ i {
			set.add(sc.nextInt());
		} {
			set.add(sc.nextInt());
		} set.add(sc.nextInt()) set.add set sc.nextInt() sc.nextInt sc long A[]= new long[N]; A new long[N] N A[0]=1 A[0] A 0 1 if (set.contains(1)==false) {
			A[1]=1;
		} set.contains(1)==false set.contains(1) set.contains set 1 false {
			A[1]=1;
		} A[1]=1 A[1] A 1 1 for(int i=2;i<N;i++) {
			if (set.contains(i)==false) {
				A[i]=(A[i-1]+A[i-2])%1000000007;
			}
		} int i=2; int i=2; i 2 i<N i N i++ i++ i {
			if (set.contains(i)==false) {
				A[i]=(A[i-1]+A[i-2])%1000000007;
			}
		} {
			if (set.contains(i)==false) {
				A[i]=(A[i-1]+A[i-2])%1000000007;
			}
		} if (set.contains(i)==false) {
				A[i]=(A[i-1]+A[i-2])%1000000007;
			} set.contains(i)==false set.contains(i) set.contains set i false {
				A[i]=(A[i-1]+A[i-2])%1000000007;
			} A[i]=(A[i-1]+A[i-2])%1000000007 A[i] A i (A[i-1]+A[i-2])%1000000007 (A[i-1]+A[i-2]) A[i-1] A i-1 i 1 A[i-2] A i-2 i 2 1000000007 System.out.println((A[N-1]+A[N-2])%1000000007) System.out.println System.out System System.out (A[N-1]+A[N-2])%1000000007 (A[N-1]+A[N-2]) A[N-1] A N-1 N 1 A[N-2] A N-2 N 2 1000000007 String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		if (N==1) {
			System.out.println(1);
			return ;
		}
		int M = sc.nextInt();
		Set<Integer> set = new HashSet<Integer>();
		for (int i=0;i<M;i++) {
			set.add(sc.nextInt());
		}
		long A[]= new long[N];
		A[0]=1;
		if (set.contains(1)==false) {
			A[1]=1;
		}
		for(int i=2;i<N;i++) {
			if (set.contains(i)==false) {
				A[i]=(A[i-1]+A[i-2])%1000000007;
			}
		}
		System.out.println((A[N-1]+A[N-2])%1000000007);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		if (N==1) {
			System.out.println(1);
			return ;
		}
		int M = sc.nextInt();
		Set<Integer> set = new HashSet<Integer>();
		for (int i=0;i<M;i++) {
			set.add(sc.nextInt());
		}
		long A[]= new long[N];
		A[0]=1;
		if (set.contains(1)==false) {
			A[1]=1;
		}
		for(int i=2;i<N;i++) {
			if (set.contains(i)==false) {
				A[i]=(A[i-1]+A[i-2])%1000000007;
			}
		}
		System.out.println((A[N-1]+A[N-2])%1000000007);
	}
} Main
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		if (N==1) {
			System.out.println(1);
			return ;
		}
		int M = sc.nextInt();
		Set<Integer> set = new HashSet<Integer>();
		for (int i=0;i<M;i++) {
			set.add(sc.nextInt());
		}
		long A[]= new long[N];
		A[0]=1;
		if (set.contains(1)==false) {
			A[1]=1;
		}
		for(int i=2;i<N;i++) {
			if (set.contains(i)==false) {
				A[i]=(A[i-1]+A[i-2])%1000000007;
			}
		}
		System.out.println((A[N-1]+A[N-2])%1000000007);
	}
}