n, m = list(map(int, input().split() ))
broken = [int(input()) for _ in range(m)]

mod = 10**9+7

num_way = [0] * (n+1)
num_way[0] = 1
if 1 in broken:
	num_way[1] = 0
else:
	num_way[1] = 1

for i in range(2, (n+1)):
	if i in broken:
		num_way[i] = 0
	else:
		num_way[i] = (num_way[i-1] + num_way[i-2]) % mod

print (num_way[n])