using System;
using System.Linq;

class Program
{
    public static void Main()
    {
        var line = Console.ReadLine().Split(' ').Select(p => long.Parse(p)).ToArray();
        long N = line[0];
        long M = line[1];
        long r = 0;
        long r_ = 1;
        long r__ = 0;
        bool k = true;
        bool[] broken = new bool[N + 1];

        for (long i = 0; i < M; i++)
        {
            broken[long.Parse(Console.ReadLine())] = true;
        }

        for (long i = 1; i <= N; i++)
        {
            if (broken[i])
            {
                r = 0;
            }
            else
            {
                r = r_ + r__;
            }
            r__ = r_;
            r_ = r;
        }

        Console.WriteLine(r % 1000000007);
        
    }

}