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

namespace MyProgram{
    class AtCoder{
        static void Main(){
            long[] input = Array.ConvertAll(Console.ReadLine().Split(' '),long.Parse);
            long N = input[0];
            long M = input[1];
            var a = new long[M];
            for(var i=0;i<M;i++){
                a[i] = long.Parse(Console.ReadLine());
            }
            var dp = new long[N+1];
            dp[0] = 1;
            for(var i=1;i<=N;i++){
                if(!a.Contains(i-1))dp[i] += dp[i-1];
                if(!a.Contains(i-2)&&i>=2)dp[i] += dp[i-2];
                dp[i] %= 1000000007;
            }
            Console.WriteLine(dp[N]);
        }
    } 
}
