n, m = gets.chomp.split.map(&:to_i)
hash = {}
m.times do |i|
	hash[gets.chomp.to_i] = true 
end

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

(n-1).times do |i|
	next if hash.has_key?(i)
	ngo[i+1] += ngo[i] if hash.has_key?(i+1) == false 
	ngo[i+2] += ngo[i] if hash.has_key?(i+2) == false 
end
ngo[n] += ngo[n-1] if hash.has_key?(n-2) == false

puts ngo[n] % (10 ** 9 + 7)

