using System;


namespace FibonacciSample
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] str0 = Console.ReadLine().Split(' ');
            long n = int.Parse(str0[0]);
            long m = int.Parse(str0[1]);
            long[] s = new long[m + 1];

            for (int i = 0; i < m; i++)
            {
                s[i] = long.Parse(Console.ReadLine());
            }
            s[m] = 0;
            long[]f =new long[n+1];
            int j = 0;
            if (s[0] == 1 && s[1] != 2)
            {
                f[1] = 0;
                f[2] = 1;
                j++;
            }
            else if (s[0] == 2)
            {
                f[1] = 1;
                f[2] = 0;
                j++;
            }
            else if (s[0] == 1 && s[1] == 2)
            {
                f[n] = 0;
            }
            else
            {
                f[2] = 2;
                f[1] = 1;
            }

            for (int i = 3; i <= n; i++)
            {
                if (i != s[j])
                {
                    f[i] = f[i - 1] + f[i - 2];
                }
                else
                {
                    f[i] = 0;
                    j++;
                }
            }
            Console.WriteLine(f[n]%1000000007);
        }
    }

}