N, M = gets.split.map!(&:to_i)
A = []
while tmp = gets
	A << tmp.to_i
end
ans = Array.new(N + 2, 0)
ans[N] = 1
i = N - 1
while i > -1
	if not A.member?(i)
		ans[i] = ans[i + 1] + ans[i + 2]
	end
	i -= 1
end
puts ans[0] % 1_000_000_007