N, M = gets.chomp.split().map(&:to_i)

danger = []
M.times do
  danger << gets.chomp.to_i
end

dp = [0] * (N+1)
dp[0] = 1
if danger[0] == 1
  dp[1] = 0
  danger.shift
else
  dp[1] = 1
end

for i in 2..N do
  if i == danger[0]
    dp[i] = 0
    danger.shift
  else
    dp[i] = dp[i-1] + dp[i-2]
  end
end

puts dp[-1] % 1000000007
