n,m=map(int,input().split())
a=[int(input()) for i in range(m)]
C=[1]
if 1 in a:
	C.append(0)
else:
	C.append(1)
for i in range(2,n+1):
	if i in a:
		C.append(0)
	else:
		c=C[i-1]+C[i-2]
		C.append(c)
print(c%(10**9+7))