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

break_stairs = []
(1..n).each do |i|
    break_stairs[i] = false
end

m.times { break_stairs[gets.to_i] = true }

route_counts = []
route_counts[0] = 1

(1..n).each do |i|
    if break_stairs[i] == true
        route_counts[i] = 0
        next
    end
    if i == 1
        route_counts[i] = 1
        next
    end
    route_counts[i] = route_counts[i-1] + route_counts[i-2]
end

puts "#{route_counts[n] % 1000000007}"
