import sys

def cul_1to2(i):
	global ppre_step
	global pre_step
	global now_step
	if i == 1:
		if i not in denger_list:
			ppre_step,pre_step,now_step = pre_step,0,1

		if i in denger_list:
			ppre_step,pre_step,now_step = pre_step ,0,0

	if i == 2:
		if i not in denger_list:
			if 1 in denger_list:
				ppre_step,pre_step,now_step = pre_step,now_step,1	
			else:
				ppre_step,pre_step,now_step = pre_step,now_step,2
		if i in denger_list:
			ppre_step,pre_step,now_step = pre_step ,now_step,0

	return ppre_step,pre_step,now_step


N,M = map(int,input().split())
step_list = list(range(N+1))
denger_list = list()
Int_pre =None
for i in range(M):
	if Int_pre != None:
		Int = int(input())
		if abs(Int - Int_pre) == 1:
			print(0)
			sys.exit()
		else:
			denger_list.append(Int)
			Int_pre = Int
	else:
		Int = int(input())
		denger_list.append(Int)
		Int_pre = Int

ppre_step = None
pre_step  = None
now_step  = 0

for i in range(N+1):
	if i == 0:
		continue
	if i <= 2:
		cul_1to2(i)
	else:
		if i not in denger_list:
			ppre_step = pre_step
			pre_step  = now_step
			now_step  = ppre_step + pre_step

		elif i in denger_list:
			ppre_step = pre_step
			pre_step  = now_step
			now_step  = 0 

print(now_step%1000000007)
