import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Deque;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;
 
 
public class Main {

	static long MOD = 1_000_000_007;
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		//int N = Integer.parseInt(sc.next());
		//long L = Long.parseLong(sc.next());
		//char[] c = sc.next().toCharArray();
		int INF = Integer.MAX_VALUE;
		long ans = 0;
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		long[] dp = new long[N+1];
		boolean[] hole = new boolean[N+1];
		Arrays.fill(hole, false);
		for(int i=0; i<M; i++){
			int m = Integer.parseInt(sc.next());
			hole[m] = true;
		}
		
		if(N==1){
			ans = 1;
		}
		dp[0] = 1;
	
		if(!hole[1]){
			dp[1] = 1;
		}
		
		for(int i=2;i<=N;i++){
			if(!hole[i-1])dp[i] += dp[i-1];
			dp[i] %= MOD;
			if(!hole[i-2])dp[i] += dp[i-2];
			dp[i] %= MOD;
			if(hole[i])dp[i] = 0;
			dp[i] %= MOD;
		}
		
		//Arrays.sort(W);
		
		ans = dp[N];
		System.out.println(ans);
		
	}
	
	
}
 import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.util.ArrayDeque; ArrayDeque java.util import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Collections; Collections java.util import java.util.Deque; Deque java.util import java.util.List; List java.util import java.util.NoSuchElementException; NoSuchElementException java.util import java.util.PriorityQueue; PriorityQueue java.util import java.util.Queue; Queue java.util import java.util.Scanner; Scanner java.util public class Main {

	static long MOD = 1_000_000_007;
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		//int N = Integer.parseInt(sc.next());
		//long L = Long.parseLong(sc.next());
		//char[] c = sc.next().toCharArray();
		int INF = Integer.MAX_VALUE;
		long ans = 0;
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		long[] dp = new long[N+1];
		boolean[] hole = new boolean[N+1];
		Arrays.fill(hole, false);
		for(int i=0; i<M; i++){
			int m = Integer.parseInt(sc.next());
			hole[m] = true;
		}
		
		if(N==1){
			ans = 1;
		}
		dp[0] = 1;
	
		if(!hole[1]){
			dp[1] = 1;
		}
		
		for(int i=2;i<=N;i++){
			if(!hole[i-1])dp[i] += dp[i-1];
			dp[i] %= MOD;
			if(!hole[i-2])dp[i] += dp[i-2];
			dp[i] %= MOD;
			if(hole[i])dp[i] = 0;
			dp[i] %= MOD;
		}
		
		//Arrays.sort(W);
		
		ans = dp[N];
		System.out.println(ans);
		
	}
	
	
} Main static long MOD = 1_000_000_007; MOD 1_000_000_007 public static void main(String[] args) {
		// TODO Auto-generated method stub
		//int N = Integer.parseInt(sc.next());
		//long L = Long.parseLong(sc.next());
		//char[] c = sc.next().toCharArray();
		int INF = Integer.MAX_VALUE;
		long ans = 0;
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		long[] dp = new long[N+1];
		boolean[] hole = new boolean[N+1];
		Arrays.fill(hole, false);
		for(int i=0; i<M; i++){
			int m = Integer.parseInt(sc.next());
			hole[m] = true;
		}
		
		if(N==1){
			ans = 1;
		}
		dp[0] = 1;
	
		if(!hole[1]){
			dp[1] = 1;
		}
		
		for(int i=2;i<=N;i++){
			if(!hole[i-1])dp[i] += dp[i-1];
			dp[i] %= MOD;
			if(!hole[i-2])dp[i] += dp[i-2];
			dp[i] %= MOD;
			if(hole[i])dp[i] = 0;
			dp[i] %= MOD;
		}
		
		//Arrays.sort(W);
		
		ans = dp[N];
		System.out.println(ans);
		
	} main {
		// TODO Auto-generated method stub
		//int N = Integer.parseInt(sc.next());
		//long L = Long.parseLong(sc.next());
		//char[] c = sc.next().toCharArray();
		int INF = Integer.MAX_VALUE;
		long ans = 0;
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		long[] dp = new long[N+1];
		boolean[] hole = new boolean[N+1];
		Arrays.fill(hole, false);
		for(int i=0; i<M; i++){
			int m = Integer.parseInt(sc.next());
			hole[m] = true;
		}
		
		if(N==1){
			ans = 1;
		}
		dp[0] = 1;
	
		if(!hole[1]){
			dp[1] = 1;
		}
		
		for(int i=2;i<=N;i++){
			if(!hole[i-1])dp[i] += dp[i-1];
			dp[i] %= MOD;
			if(!hole[i-2])dp[i] += dp[i-2];
			dp[i] %= MOD;
			if(hole[i])dp[i] = 0;
			dp[i] %= MOD;
		}
		
		//Arrays.sort(W);
		
		ans = dp[N];
		System.out.println(ans);
		
	} int INF = Integer.MAX_VALUE; INF Integer.MAX_VALUE Integer Integer.MAX_VALUE long ans = 0; ans 0 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 long[] dp = new long[N+1]; dp new long[N+1] N+1 N 1 boolean[] hole = new boolean[N+1]; hole new boolean[N+1] N+1 N 1 Arrays.fill(hole, false) Arrays.fill Arrays hole false for(int i=0; i<M; i++){
			int m = Integer.parseInt(sc.next());
			hole[m] = true;
		} int i=0; int i=0; i 0 i<M i M i++ i++ i {
			int m = Integer.parseInt(sc.next());
			hole[m] = true;
		} {
			int m = Integer.parseInt(sc.next());
			hole[m] = true;
		} int m = Integer.parseInt(sc.next()); m Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc hole[m] = true hole[m] hole m true if(N==1){
			ans = 1;
		} N==1 N 1 {
			ans = 1;
		} ans = 1 ans 1 dp[0] = 1 dp[0] dp 0 1 if(!hole[1]){
			dp[1] = 1;
		} !hole[1] hole[1] hole 1 {
			dp[1] = 1;
		} dp[1] = 1 dp[1] dp 1 1 for(int i=2;i<=N;i++){
			if(!hole[i-1])dp[i] += dp[i-1];
			dp[i] %= MOD;
			if(!hole[i-2])dp[i] += dp[i-2];
			dp[i] %= MOD;
			if(hole[i])dp[i] = 0;
			dp[i] %= MOD;
		} int i=2; int i=2; i 2 i<=N i N i++ i++ i {
			if(!hole[i-1])dp[i] += dp[i-1];
			dp[i] %= MOD;
			if(!hole[i-2])dp[i] += dp[i-2];
			dp[i] %= MOD;
			if(hole[i])dp[i] = 0;
			dp[i] %= MOD;
		} {
			if(!hole[i-1])dp[i] += dp[i-1];
			dp[i] %= MOD;
			if(!hole[i-2])dp[i] += dp[i-2];
			dp[i] %= MOD;
			if(hole[i])dp[i] = 0;
			dp[i] %= MOD;
		} if(!hole[i-1])dp[i] += dp[i-1]; !hole[i-1] hole[i-1] hole i-1 i 1 dp[i] += dp[i-1] dp[i] dp i dp[i-1] dp i-1 i 1 dp[i] %= MOD dp[i] dp i MOD if(!hole[i-2])dp[i] += dp[i-2]; !hole[i-2] hole[i-2] hole i-2 i 2 dp[i] += dp[i-2] dp[i] dp i dp[i-2] dp i-2 i 2 dp[i] %= MOD dp[i] dp i MOD if(hole[i])dp[i] = 0; hole[i] hole i dp[i] = 0 dp[i] dp i 0 dp[i] %= MOD dp[i] dp i MOD ans = dp[N] ans dp[N] dp N System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	static long MOD = 1_000_000_007;
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		//int N = Integer.parseInt(sc.next());
		//long L = Long.parseLong(sc.next());
		//char[] c = sc.next().toCharArray();
		int INF = Integer.MAX_VALUE;
		long ans = 0;
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		long[] dp = new long[N+1];
		boolean[] hole = new boolean[N+1];
		Arrays.fill(hole, false);
		for(int i=0; i<M; i++){
			int m = Integer.parseInt(sc.next());
			hole[m] = true;
		}
		
		if(N==1){
			ans = 1;
		}
		dp[0] = 1;
	
		if(!hole[1]){
			dp[1] = 1;
		}
		
		for(int i=2;i<=N;i++){
			if(!hole[i-1])dp[i] += dp[i-1];
			dp[i] %= MOD;
			if(!hole[i-2])dp[i] += dp[i-2];
			dp[i] %= MOD;
			if(hole[i])dp[i] = 0;
			dp[i] %= MOD;
		}
		
		//Arrays.sort(W);
		
		ans = dp[N];
		System.out.println(ans);
		
	}
	
	
} public class Main {

	static long MOD = 1_000_000_007;
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		//int N = Integer.parseInt(sc.next());
		//long L = Long.parseLong(sc.next());
		//char[] c = sc.next().toCharArray();
		int INF = Integer.MAX_VALUE;
		long ans = 0;
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		long[] dp = new long[N+1];
		boolean[] hole = new boolean[N+1];
		Arrays.fill(hole, false);
		for(int i=0; i<M; i++){
			int m = Integer.parseInt(sc.next());
			hole[m] = true;
		}
		
		if(N==1){
			ans = 1;
		}
		dp[0] = 1;
	
		if(!hole[1]){
			dp[1] = 1;
		}
		
		for(int i=2;i<=N;i++){
			if(!hole[i-1])dp[i] += dp[i-1];
			dp[i] %= MOD;
			if(!hole[i-2])dp[i] += dp[i-2];
			dp[i] %= MOD;
			if(hole[i])dp[i] = 0;
			dp[i] %= MOD;
		}
		
		//Arrays.sort(W);
		
		ans = dp[N];
		System.out.println(ans);
		
	}
	
	
} Main
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Deque;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;
 
 
public class Main {

	static long MOD = 1_000_000_007;
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		//int N = Integer.parseInt(sc.next());
		//long L = Long.parseLong(sc.next());
		//char[] c = sc.next().toCharArray();
		int INF = Integer.MAX_VALUE;
		long ans = 0;
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int M = Integer.parseInt(sc.next());
		long[] dp = new long[N+1];
		boolean[] hole = new boolean[N+1];
		Arrays.fill(hole, false);
		for(int i=0; i<M; i++){
			int m = Integer.parseInt(sc.next());
			hole[m] = true;
		}
		
		if(N==1){
			ans = 1;
		}
		dp[0] = 1;
	
		if(!hole[1]){
			dp[1] = 1;
		}
		
		for(int i=2;i<=N;i++){
			if(!hole[i-1])dp[i] += dp[i-1];
			dp[i] %= MOD;
			if(!hole[i-2])dp[i] += dp[i-2];
			dp[i] %= MOD;
			if(hole[i])dp[i] = 0;
			dp[i] %= MOD;
		}
		
		//Arrays.sort(W);
		
		ans = dp[N];
		System.out.println(ans);
		
	}
	
	
}

