using System;
using System.Linq;
using System.Collections.Generic;
using static System.Console;
using System.Text;

namespace AtCoder_Beginner_Contest_129
{
    class Program
    {
        static public int[] Sarray() { return ReadLine().Split().Select(int.Parse).ToArray(); }
        static public List<int> Slist() { return ReadLine().Split().Select(int.Parse).ToList(); }

        static void Main(string[] args)
        {
            var NM = Sarray();
            var N = NM[0];
            var M = NM[1];
            var am = new int[N];
            for(var i=0;i<M;++i)
            {
                am[Sarray()[0] - 1] = 1;
            }
            var num = new long[N];
            if (0 == am[0]) num[0] = 1;
            if (0 == am[1]) num[1] = 1 + num[0];
            if(num[0]==0&num[1]==0)
            {
                WriteLine(0);
                return;
            }
            for (var i = 2; i < N; ++i)
            {
                if (0 != am[i])
                {
                    if (0 != am[i - 1])
                    {
                        WriteLine(0);
                        return;
                    }
                    continue;
                }
                num[i] = (num[i - 1] + num[i - 2])%1000000007;
            }
            WriteLine(num[N - 1]);
        }
    }
}