local mod = 1000000007
local function badd(x, y) return (x + y) % mod end
local n, m = io.read("*n", "*n")
local f, dp = {}, {}
for i = 1, n + 2 do
  f[i] = true
  dp[i] = 0
end
for i = 1, m do
  local a = io.read("*n")
  f[a + 1] = false
end
dp[1] = 1
for i = 1, n do
  if f[i] then
    dp[i + 1] = badd(dp[i + 1], dp[i])
    dp[i + 2] = badd(dp[i + 2], dp[i])
  end
end
print(dp[n + 1])
