using System;
using System.Linq;

public class Test
{
	public static void Main()
	{
		// your code goes here
		
		var b = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray();
		int n = b[0];
		int m = b[1];
		
		bool[] isBroken = new bool[n+10];
		for(int i = 0; i < m; i++){
			int input = int.Parse(Console.ReadLine());
			isBroken[input] = true;
		}
		
		long[] dp = new long[n+10];
		dp[0] = 1;
		
		for(int i = 1; i <= n; i++) {
			if(isBroken[i]){
				dp[i] = 0;
			}else{
				if(i==1){
					dp[i] = dp[i-1];
				}else{
					dp[i] = dp[i-1] + dp[i-2];	
				}
			}
		}
		Console.WriteLine(dp[n]%1000000007);
	}
}