n, m = gets.split.map(&:to_i)
broken_stairs = m.times.map {gets.to_i}
dp = Array.new(n + 1)
broken_stairs.each do |stair|
  dp[stair] = 0
end
dp[0] = 1
dp[1] = 1
mod = 1000000007
(2..n).each do |i|
  dp[i] = (dp[i-1] + dp[i-2]) % mod unless dp[i]
end

puts dp[n]