import java.util.Scanner;

public class Main{//ABC129C

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		
		boolean[] list = new boolean[N+1];
		
		for(int i=0;i<M;i++){
			int a = Integer.parseInt(sc.next());
			list[a] = true;
		}
		
		long[] dp = new long[N+1];
		dp[0]=1;
		for(int now=0;now<N;now++) {
			for(int next=now+1;next<=Math.min(N,now+2);next++) {
				if(!(list[next])) {
					dp[next]+=dp[now];
					dp[next]%=1000000007;
				}
			}
		}
		System.out.println(dp[N]);
	}
} import java.util.Scanner; Scanner java.util public class Main{//ABC129C

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		
		boolean[] list = new boolean[N+1];
		
		for(int i=0;i<M;i++){
			int a = Integer.parseInt(sc.next());
			list[a] = true;
		}
		
		long[] dp = new long[N+1];
		dp[0]=1;
		for(int now=0;now<N;now++) {
			for(int next=now+1;next<=Math.min(N,now+2);next++) {
				if(!(list[next])) {
					dp[next]+=dp[now];
					dp[next]%=1000000007;
				}
			}
		}
		System.out.println(dp[N]);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		
		boolean[] list = new boolean[N+1];
		
		for(int i=0;i<M;i++){
			int a = Integer.parseInt(sc.next());
			list[a] = true;
		}
		
		long[] dp = new long[N+1];
		dp[0]=1;
		for(int now=0;now<N;now++) {
			for(int next=now+1;next<=Math.min(N,now+2);next++) {
				if(!(list[next])) {
					dp[next]+=dp[now];
					dp[next]%=1000000007;
				}
			}
		}
		System.out.println(dp[N]);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		
		boolean[] list = new boolean[N+1];
		
		for(int i=0;i<M;i++){
			int a = Integer.parseInt(sc.next());
			list[a] = true;
		}
		
		long[] dp = new long[N+1];
		dp[0]=1;
		for(int now=0;now<N;now++) {
			for(int next=now+1;next<=Math.min(N,now+2);next++) {
				if(!(list[next])) {
					dp[next]+=dp[now];
					dp[next]%=1000000007;
				}
			}
		}
		System.out.println(dp[N]);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int M = Integer.parseInt(sc.next()); M Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc boolean[] list = new boolean[N+1]; list new boolean[N+1] N+1 N 1 for(int i=0;i<M;i++){
			int a = Integer.parseInt(sc.next());
			list[a] = true;
		} int i=0; int i=0; i 0 i<M i M i++ i++ i {
			int a = Integer.parseInt(sc.next());
			list[a] = true;
		} {
			int a = Integer.parseInt(sc.next());
			list[a] = true;
		} int a = Integer.parseInt(sc.next()); a Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc list[a] = true list[a] list a true long[] dp = new long[N+1]; dp new long[N+1] N+1 N 1 dp[0]=1 dp[0] dp 0 1 for(int now=0;now<N;now++) {
			for(int next=now+1;next<=Math.min(N,now+2);next++) {
				if(!(list[next])) {
					dp[next]+=dp[now];
					dp[next]%=1000000007;
				}
			}
		} int now=0; int now=0; now 0 now<N now N now++ now++ now {
			for(int next=now+1;next<=Math.min(N,now+2);next++) {
				if(!(list[next])) {
					dp[next]+=dp[now];
					dp[next]%=1000000007;
				}
			}
		} {
			for(int next=now+1;next<=Math.min(N,now+2);next++) {
				if(!(list[next])) {
					dp[next]+=dp[now];
					dp[next]%=1000000007;
				}
			}
		} for(int next=now+1;next<=Math.min(N,now+2);next++) {
				if(!(list[next])) {
					dp[next]+=dp[now];
					dp[next]%=1000000007;
				}
			} int next=now+1; int next=now+1; next now+1 now 1 next<=Math.min(N,now+2) next Math.min(N,now+2) Math.min Math N now+2 now 2 next++ next++ next {
				if(!(list[next])) {
					dp[next]+=dp[now];
					dp[next]%=1000000007;
				}
			} {
				if(!(list[next])) {
					dp[next]+=dp[now];
					dp[next]%=1000000007;
				}
			} if(!(list[next])) {
					dp[next]+=dp[now];
					dp[next]%=1000000007;
				} !(list[next]) (list[next]) list next {
					dp[next]+=dp[now];
					dp[next]%=1000000007;
				} dp[next]+=dp[now] dp[next] dp next dp[now] dp now dp[next]%=1000000007 dp[next] dp next 1000000007 System.out.println(dp[N]) System.out.println System.out System System.out dp[N] dp N String[] args args public class Main{//ABC129C

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		
		boolean[] list = new boolean[N+1];
		
		for(int i=0;i<M;i++){
			int a = Integer.parseInt(sc.next());
			list[a] = true;
		}
		
		long[] dp = new long[N+1];
		dp[0]=1;
		for(int now=0;now<N;now++) {
			for(int next=now+1;next<=Math.min(N,now+2);next++) {
				if(!(list[next])) {
					dp[next]+=dp[now];
					dp[next]%=1000000007;
				}
			}
		}
		System.out.println(dp[N]);
	}
} public class Main{//ABC129C

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		
		boolean[] list = new boolean[N+1];
		
		for(int i=0;i<M;i++){
			int a = Integer.parseInt(sc.next());
			list[a] = true;
		}
		
		long[] dp = new long[N+1];
		dp[0]=1;
		for(int now=0;now<N;now++) {
			for(int next=now+1;next<=Math.min(N,now+2);next++) {
				if(!(list[next])) {
					dp[next]+=dp[now];
					dp[next]%=1000000007;
				}
			}
		}
		System.out.println(dp[N]);
	}
} Main
import java.util.Scanner;

public class Main{//ABC129C

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		
		boolean[] list = new boolean[N+1];
		
		for(int i=0;i<M;i++){
			int a = Integer.parseInt(sc.next());
			list[a] = true;
		}
		
		long[] dp = new long[N+1];
		dp[0]=1;
		for(int now=0;now<N;now++) {
			for(int next=now+1;next<=Math.min(N,now+2);next++) {
				if(!(list[next])) {
					dp[next]+=dp[now];
					dp[next]%=1000000007;
				}
			}
		}
		System.out.println(dp[N]);
	}
}