import java.util.*;

public class Main {
	
	static long MOD  = 1000000007;
	
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(),m=sc.nextInt();
		HashSet<Integer> broken = new HashSet<>();
		
		for(int i =0;i<m;i++)broken.add(sc.nextInt());
		
		long[] dp = new long[n+1];
		
		
		dp[0]=1;
		if(broken.contains(1))dp[1]=0;
		else dp[1]=1;
		
		for(int i=2;i<n+1;i++) {
			if(broken.contains(i)) {
				dp[i]=0;
			}else{
				dp[i]=dp[i-2]%MOD +dp[i-1]%MOD;
			}
		}
		
		//for(int i=0;i<n+1;i++)System.out.println(dp[i]);
		long ans = dp[n]%MOD;
		System.out.println(ans);
		
		
	}

} import java.util.*; util.* java public class Main {
	
	static long MOD  = 1000000007;
	
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(),m=sc.nextInt();
		HashSet<Integer> broken = new HashSet<>();
		
		for(int i =0;i<m;i++)broken.add(sc.nextInt());
		
		long[] dp = new long[n+1];
		
		
		dp[0]=1;
		if(broken.contains(1))dp[1]=0;
		else dp[1]=1;
		
		for(int i=2;i<n+1;i++) {
			if(broken.contains(i)) {
				dp[i]=0;
			}else{
				dp[i]=dp[i-2]%MOD +dp[i-1]%MOD;
			}
		}
		
		//for(int i=0;i<n+1;i++)System.out.println(dp[i]);
		long ans = dp[n]%MOD;
		System.out.println(ans);
		
		
	}

} Main static long MOD  = 1000000007; MOD 1000000007 public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(),m=sc.nextInt();
		HashSet<Integer> broken = new HashSet<>();
		
		for(int i =0;i<m;i++)broken.add(sc.nextInt());
		
		long[] dp = new long[n+1];
		
		
		dp[0]=1;
		if(broken.contains(1))dp[1]=0;
		else dp[1]=1;
		
		for(int i=2;i<n+1;i++) {
			if(broken.contains(i)) {
				dp[i]=0;
			}else{
				dp[i]=dp[i-2]%MOD +dp[i-1]%MOD;
			}
		}
		
		//for(int i=0;i<n+1;i++)System.out.println(dp[i]);
		long ans = dp[n]%MOD;
		System.out.println(ans);
		
		
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(),m=sc.nextInt();
		HashSet<Integer> broken = new HashSet<>();
		
		for(int i =0;i<m;i++)broken.add(sc.nextInt());
		
		long[] dp = new long[n+1];
		
		
		dp[0]=1;
		if(broken.contains(1))dp[1]=0;
		else dp[1]=1;
		
		for(int i=2;i<n+1;i++) {
			if(broken.contains(i)) {
				dp[i]=0;
			}else{
				dp[i]=dp[i-2]%MOD +dp[i-1]%MOD;
			}
		}
		
		//for(int i=0;i<n+1;i++)System.out.println(dp[i]);
		long ans = dp[n]%MOD;
		System.out.println(ans);
		
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n=sc.nextInt() n sc.nextInt() sc.nextInt sc m=sc.nextInt(); m sc.nextInt() sc.nextInt sc HashSet<Integer> broken = new HashSet<>(); broken new HashSet<>() for(int i =0;i<m;i++)broken.add(sc.nextInt()); int i =0; int i =0; i 0 i<m i m i++ i++ i broken.add(sc.nextInt()); broken.add(sc.nextInt()) broken.add broken sc.nextInt() sc.nextInt sc long[] dp = new long[n+1]; dp new long[n+1] n+1 n 1 dp[0]=1 dp[0] dp 0 1 if(broken.contains(1))dp[1]=0;
		else dp[1]=1; broken.contains(1) broken.contains broken 1 dp[1]=0 dp[1] dp 1 0 dp[1]=1 dp[1] dp 1 1 for(int i=2;i<n+1;i++) {
			if(broken.contains(i)) {
				dp[i]=0;
			}else{
				dp[i]=dp[i-2]%MOD +dp[i-1]%MOD;
			}
		} int i=2; int i=2; i 2 i<n+1 i n+1 n 1 i++ i++ i {
			if(broken.contains(i)) {
				dp[i]=0;
			}else{
				dp[i]=dp[i-2]%MOD +dp[i-1]%MOD;
			}
		} {
			if(broken.contains(i)) {
				dp[i]=0;
			}else{
				dp[i]=dp[i-2]%MOD +dp[i-1]%MOD;
			}
		} if(broken.contains(i)) {
				dp[i]=0;
			}else{
				dp[i]=dp[i-2]%MOD +dp[i-1]%MOD;
			} broken.contains(i) broken.contains broken i {
				dp[i]=0;
			} dp[i]=0 dp[i] dp i 0 {
				dp[i]=dp[i-2]%MOD +dp[i-1]%MOD;
			} dp[i]=dp[i-2]%MOD +dp[i-1]%MOD dp[i] dp i dp[i-2]%MOD +dp[i-1]%MOD dp[i-2]%MOD dp[i-2] dp i-2 i 2 MOD dp[i-1]%MOD dp[i-1] dp i-1 i 1 MOD long ans = dp[n]%MOD; ans dp[n]%MOD dp[n] dp n MOD System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	
	static long MOD  = 1000000007;
	
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(),m=sc.nextInt();
		HashSet<Integer> broken = new HashSet<>();
		
		for(int i =0;i<m;i++)broken.add(sc.nextInt());
		
		long[] dp = new long[n+1];
		
		
		dp[0]=1;
		if(broken.contains(1))dp[1]=0;
		else dp[1]=1;
		
		for(int i=2;i<n+1;i++) {
			if(broken.contains(i)) {
				dp[i]=0;
			}else{
				dp[i]=dp[i-2]%MOD +dp[i-1]%MOD;
			}
		}
		
		//for(int i=0;i<n+1;i++)System.out.println(dp[i]);
		long ans = dp[n]%MOD;
		System.out.println(ans);
		
		
	}

} public class Main {
	
	static long MOD  = 1000000007;
	
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(),m=sc.nextInt();
		HashSet<Integer> broken = new HashSet<>();
		
		for(int i =0;i<m;i++)broken.add(sc.nextInt());
		
		long[] dp = new long[n+1];
		
		
		dp[0]=1;
		if(broken.contains(1))dp[1]=0;
		else dp[1]=1;
		
		for(int i=2;i<n+1;i++) {
			if(broken.contains(i)) {
				dp[i]=0;
			}else{
				dp[i]=dp[i-2]%MOD +dp[i-1]%MOD;
			}
		}
		
		//for(int i=0;i<n+1;i++)System.out.println(dp[i]);
		long ans = dp[n]%MOD;
		System.out.println(ans);
		
		
	}

} Main
import java.util.*;

public class Main {
	
	static long MOD  = 1000000007;
	
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(),m=sc.nextInt();
		HashSet<Integer> broken = new HashSet<>();
		
		for(int i =0;i<m;i++)broken.add(sc.nextInt());
		
		long[] dp = new long[n+1];
		
		
		dp[0]=1;
		if(broken.contains(1))dp[1]=0;
		else dp[1]=1;
		
		for(int i=2;i<n+1;i++) {
			if(broken.contains(i)) {
				dp[i]=0;
			}else{
				dp[i]=dp[i-2]%MOD +dp[i-1]%MOD;
			}
		}
		
		//for(int i=0;i<n+1;i++)System.out.println(dp[i]);
		long ans = dp[n]%MOD;
		System.out.println(ans);
		
		
	}

}
