n, m = gets.split.map(&:to_i)
out  = []

steps = Array.new(n + 2, 1)

m.times do
  steps[gets.to_i + 1] = 0
end

steps[0] = 1
steps[1] = 1

for i in 2 .. n + 1
  if steps[i] != 0
    steps[i] = (steps[i - 1] + steps[i - 2]) % 1000000007
  end
end

puts steps[-1]
