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