n, m = gets.strip.split.map(&:to_i)
holes = m.times.map { gets.to_i }
stairs = Hash.new { 0 }
holes.each do |hole|
  stairs[hole] = false
end

stairs[0] = 1

n.times do |i|
  if stairs[i]
    if stairs[i + 1]
      stairs[i + 1] += stairs[i]
    end
    if stairs[i + 2]
      stairs[i + 2] += stairs[i]
    end
  end
end

puts(stairs[n] % 1_000_000_007)
