MOD = 1_000_000_007
n, m = gets.split.map(&:to_i)

dp = Array.new(m + 2)
m.times do
  a = gets.to_i
  dp[a] = 0
end

dp[n + 1] = 0
dp[n] = 1

(n - 1).downto(0) do |i|
  next if dp[i]
  dp[i] = (dp[i + 1] + dp[i + 2]) % MOD
end

puts dp[0]