local n,m=io.read("n","n")
local stair={}
for i=1,n do
    stair[i]=true
end
for i=1,m do
    local a=io.read("n")
    stair[a]=false
end

local dp={}
dp[0]=1
for i=1,n do
    dp[i]=0
end

for now=0,n-1 do
    for next=now+1,math.min(n,now+2) do
        if stair[next] then
            dp[next]=dp[next]+dp[now]
            dp[next]=dp[next]%1000000007
        end
    end
end
print(dp[n])