using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            var NM = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
            var N = NM[0]+1;
            var M = NM[1];
            var am = new List<int>();
            for (var i=0;i<M;i++)
            {
                am.Add(int.Parse(Console.ReadLine()));
            }
            var dp = new List<int>(Enumerable.Range(0,N).Select(s=>0));
            dp[0] = 1;
            if (am.Contains(0)) dp[0] = 0;

            for (var i=1;i<N;i++)
            {
                if (am.Contains(i)) continue;
                else dp[i] = dp[i - 1];
                if (1 < i)
                {
                    dp[i] += dp[i - 2];
                    dp[i] %= 1000000007;
                }
            }
            Console.WriteLine(dp[N-1]);
        }
    }
}
