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

namespace Typical_Stairs1
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = ReadLine();
            long TotalStep = 0;
            long TotalBrokenStep = 0;
            long m = 0;
            string[] array = input.Split(' ');
            TotalStep = long.Parse(array[0]);
            TotalBrokenStep = long.Parse(array[1]);
            long [] step = new long[TotalStep+1];
            long[] BrokenStep = new long[TotalBrokenStep+1];
            for (long i = 0; i < TotalBrokenStep; i++) {
                BrokenStep[i] = long.Parse(ReadLine());            
            }
            step[0] = 1;
            step[1] = 1;
            if (BrokenStep[0]==1) {
                step[0] = 0;
            }
            if (BrokenStep[0] == 2)
            {
                step[1] = 0;
            }
            if (BrokenStep[1]==2) {
                step[1] = 0;
            }

            for (long i = 2; i < TotalStep+1; i++) {
                if (i == BrokenStep[m])
                {
                    step[i] = 0;
                    m += 1;

                }
                else
                {
                    step[i] = step[i - 1] + step[i - 2];
                }
            }
            WriteLine(step[TotalStep]%1000000007);
            ReadKey();



        }
    }
}

