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

steps = Array.new(n+1)
steps[0] = 1
steps[1] = 1

m.times.map{|i| steps[gets.to_i] = 0 }

(2..n+1).each do |i|
  next if steps[i]
  steps[i] = (steps[i-1] + steps[i-2]) % 1_000_000_007
end

p steps[n]
