local MOD = 1000000007
local N, M = io.read("n", "n")
local broken = {}
for i=1,N do
    broken[i] = false
end
for i=1,M do
    local a = io.read("n")
    broken[a] = true
end

local dp = {}
dp[-1] = 0
dp[0] = 1
for i=1,N do
    if broken[i] then
        dp[i] = 0
    else
        dp[i] = (dp[i-1] + dp[i-2]) % MOD
    end
end
print(dp[N])