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+10)
    ok=Vector{Bool}([true for i in 1:n+10])
    for i in a
        ok[i]=false
    end
    dp[1]=1
    dp[2]=ifelse(ok[1],1,0)
    for i in 2:n+1
        if ok[i]
            dp[i+1]=dp[i]+dp[i-1]
        end
    end
    println(dp[n+1]%1000000007)
end
main()