parseInt(x) = parse(Int, x)
parseMap(x::Array{SubString{String},1}) = map(parseInt, x)
function main()
    n,m=parseMap(split(readline()))
    a=[parseInt(readline()) for i in 1:m]
    dp=zeros(Int,1,n+1)
    dp[1],dp[2]=1,1
    for i in a
        dp[i+1]=-1
    end
    for i in 2:n+1
        if dp[i]==-1
            dp[i]=0
        else
            try
                dp[i]=dp[i-1]+dp[i-2]
            catch
                dp[i]=dp[i-1]
            end
        end
    end
    println(dp[n+1]%(10^9+7))
end
main()