C = 1_000_000_007

n, m = gets.split.map(&:to_i)
broken = m.times.map {gets.to_i}

dp = Array.new(n + 1)
dp[0] = 1
dp[1] = 1
broken.each {|s| dp[s] = 0}

(2..n).each do |i|
  dp[i] = (dp[i - 1] + dp[i - 2]) % C unless dp[i]
end

puts dp[n]