import sys
N, M = map(int, input().split())
a = 0
bre = [int(input())]
for i in range(1, M):
	bre.append(int(input()))
	if bre[i]-bre[i-1] == 1:
		print(0)
		sys.exit()

f = 0
if bre[0] == 0 or bre[0] == 1:
	f_2 = 0
	f_1 = 1
else:
	f_1 = 1
	f_2 = 1

f = f_1+f_2

num = 0
for i in range(2,N):
	if num < len(bre) and i+1 == bre[num]:
		f_2 = f_1
		f_1 = f
		f = 0
		num += 1
	else:
		f_2 = f_1
		f_1 = f
		f = f_1 + f_2

print(f%1000000007)