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

namespace AtCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            //[summary]C - Typical Stairs
            var line = ReadLine();
            int N = line[0];
            int M = line[1];

            var a = GetBrokenFloors(M).ToList();

            var ans = new long[N + 1];
            ans[0] = 1;

            for(int i = 1; i <= N; i++)
            {
                if (!a.Contains(i))
                {
                    if (i == 1)
                    {
                        ans[i] = 1;
                    }
                    else
                    {
                        long sum = ans[i - 1] + ans[i - 2];
                        ans[i] = sum % 1000000007;
                    }
                }
            }

            Console.WriteLine(ans[N]);
        }

        static IEnumerable<int> GetBrokenFloors(int M)
        {
            for (int i = 0; i < M; i++)
            {
                int a = int.Parse(Console.ReadLine());
                yield return a;
            }
        }

        static List<int> ReadLine()
        {
            var line = Console.ReadLine();
            var arr = line.Split(' ');

            return arr.Select(x => int.Parse(x)).ToList();
        }
    }
}