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

namespace C___Typical_Stairs
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] input = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
            int n = input[0];
            int m = input[1];


            int[] broken = new int[m];

            for (int j = 0; j < m; j++)
            {
                broken[j] = int.Parse(Console.ReadLine());
            }

            int[] dp = new int[n + 1];

            dp[0] = 1;
            dp[1] = 1;

            if(broken.Contains(1))
            {
                dp[1] = 0;
            }

            for(int i = 2; i < n + 1; i++)
            {
                dp[i] = (dp[i - 2] + dp[i - 1]) % 1000000007;

                for (int k = 0; k < m; k++)
                {
                    if(i == broken[k])
                    {
                        dp[i] = 0;
                    }
                }


            }

            Console.WriteLine(dp[n]);

        }
    }
}