using System;


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

            for (int i = 0; i < m; i++)
            {
                s[i] = int.Parse(Console.ReadLine());
            }
            s[m] = 0;
            long[]f =new long[n+1];
            f[2]= 2;
            f[1]= 1;
            int j = 0;
            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);
        }
    }

}