n, m = gets.split.map(&:to_i)
a = []
m.times do
  a << gets.to_i
end

options = [1]

(1..n).each do |i|
  if a.any? { |broken_index| i == broken_index }
    options[i] = 0
  else
    case i
    when 1
      options[i] = options[i - 1]
    else
      options[i] = options[i - 1] + options[i - 2]
    end
  end
end

puts options.last % 1_000_000_007
