using System;
using System.Collections.Generic;

namespace Typical_Stairs
{
    class Program
    {
        static int cnt= 0;
        static void Main(string[] args)
        {
            //入力部
            string iin = Console.ReadLine();
            string[] w = iin.Split(' ');
            int n = int.Parse(w[0]);
            int m = int.Parse(w[1]);
            int a;
            var wlist = new List<int>();
            var list = new List<int>();

            for (int i = 0;i<m;i++)
            {
                string ww = Console.ReadLine();
                a = int.Parse(ww);
                wlist.Add(a);
            }

            int[] memo = new int[n+1];
            for(int i=0;i<n+1;i++)
            {
                memo[i] = -1;
            }
 
            int c = kaijo2(n, memo, wlist);            

            Console.WriteLine(c);
        }
        static int kaijo2(int n,int[] memo,List<int> lst)
        {
            int result;
            if (n == 0)
            {
                return 1;
            }
            if(n<0)
            {
                return 0;
            }
             
            result = lst.Find(x => x == n);
            if (result == n)
            {

                return 0;
            }
            if (memo[n] != -1)
            {
                return memo[n];
            }

            return memo[n] = (kaijo2(n - 1, memo, lst) + kaijo2(n - 2, memo, lst)) % 1000000007;
            
        }
    }
}