n,m=map(int,input().split())
a_list=[]
result_list=[]
for i in range(m):
	a_list.append(int(input()))
if n ==1:
	print(1)
elif n ==2 and 1 not in a_list:
	print(2)
elif n==2 and 1 in a_list:
	print(1)
else:
	if 1 in a_list:
		result_list.append(0)
	else:
		result_list.append(1)
	if 2 in a_list:
		result_list.append(0)
	elif 2 not in a_list and 1 in a_list:
		result_list.append(1)
	else:
		result_list.append(2)
	for i in range(2,n):
		if i+1 in a_list:
			result_list.append(0)
		else:
			result_list.append(result_list[i-1]+result_list[i-2])
	print(result_list[n-1]%1000000007)