N, M = gets.split.map!(&:to_i)
A = []
M.times do
	A << gets.to_i
end
ans = Array.new(N + 2, 0)
M.times do |m|
	ans[A[m]] = -1
end
ans[N] = 1
i = N - 1
while i > -1
	if ans[i] == -1
		ans[i] = 0
	else
		ans[i] = ans[i + 1] + ans[i + 2]
	end
	i -= 1
end
puts ans[0] % 1_000_000_007