n, m = list(map(int, input().split()))
a = []
for i in range(m):
	a.append(int(input()))
a.sort()
f0 = 1
if a[0] == 1:
	f1 = 0
else:
	f1 = 1
k = 0
for i in range(2, n + 1):
	while k < len(a) and a[k] < i:
		k += 1
	if k == len(a) or a[k] != i:
		f = (f0 + f1) % 1000000007
	else:
		f = 0
	f0 = f1
	f1 = f
	if f0 == f1 == 0:
		break
print(f1)