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

namespace C
{
    class Program
    {
        static void Main(string[] args)
        {
            var nm = Console.ReadLine().Split().Select(int.Parse).ToArray();
            var a = new int[nm[1]];
            var isStepAble = new bool[nm[0] + 1];

            int MOD = 1000000007;

            a = a.Select(x => x = int.Parse(Console.ReadLine())).ToArray();

            for (int i = 0; i < isStepAble.Count(); i++)
            {
                isStepAble[i] = true;
            }

            foreach (var x in a)
            {
                isStepAble[x] = false;
            }


            // foreach (var x in a)
            // {
            //     x = int.Parse(Console.ReadLine());
            //     isStepAble[x] = false;
            // }

            var dp = new int[nm[0] + 1];

            dp[0] = 0;
            dp[1] = isStepAble[1] ? 1 : 0;
            dp[2] = isStepAble[2] ? dp[1] == 1 ? 2 : 1 : 0;

            for (int i = 3; i < dp.Count(); i++)
            {
                dp[i] = ((dp[i - 1] + dp[i - 2])% MOD ) * (isStepAble[i] ? 1 : 0);
            }
            Console.WriteLine(dp.Last());
        }
    }
}
