using System;
using System.Collections.Generic;
using System.Linq;

namespace Project
{
    public class Program
    {
        public static void Main(string[] args)
        {
            var Head = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            var N = Head[0];
            var M = Head[1];
            var HoleList = new List<int>(0);
            for(int i=0; i<M; i++)
            {
                HoleList.Add(int.Parse(Console.ReadLine()));
            }

            var dp = new int[N+1];
            // 0段目
            dp[0] = 1;
            // 1段目
            dp[1] = HoleList.Contains(1) ? 0 : 1;

            // x>1段目。dp[x] = dp[x-1] + dp[x-2]
            for(int i=2; i<N+1; i++)
            {
                if (HoleList.Contains(i))
                {
                    dp[i] = 0;
                }
                else
                {
                    dp[i] = (dp[i - 1] + dp[i - 2]);
                    dp[i] %= 1000000007;
                }
            }

            Console.WriteLine(dp[N]);

        }
    }
}
