using System;

public class S
{
    private const bool FINE = true;
    private const bool BROKEN = false;
    public static void Main()
    {



        var input = Array.ConvertAll(Console.ReadLine().Split(' '), long.Parse);
        var stairCount = input[0];
        var brokenStairCount = input[1];

        var stairs = new bool[stairCount + 1];
        var patterns = new long[stairCount+1];

        for(long i = 0; i < stairCount; i++){
            stairs[i] = FINE;
            patterns[i] = 0;
        }

        for(long i = 0; i < brokenStairCount; i++){
            stairs[long.Parse(Console.ReadLine()) -1] = BROKEN;
        }

        patterns[0] = stairs[0] ? 1 : 0;
        patterns[1] = stairs[1] ? 1 : 0;
        stairs[stairCount] = BROKEN;

        for(long i = 0; i < stairCount -1; i++){
            if(stairs[i] == FINE){
                if(stairs[i+1] == FINE){
                    patterns[i+1] += patterns[i];
                }
                if(stairs[i+2] == FINE){
                    patterns[i+2] += patterns[i];
                }
            }
        }

        Console.WriteLine(patterns[stairCount-1] % 1000000007);
    }
}