n, m = map(int, input().split())
la = [int(input()) for i in range(m)]

p = [1] * (n+1)
ans = 0

for a in la:
	p[a] = 0

for i in range(n+1):
	if i == 0 and p[i] == 0:
		ans = 0
		break
	elif i > 1:
		if p[i] == 0 and p[i-1] == 0:
			ans = 0
			break
		elif p[i] > 0:
			ans = p[i-1] + p[i-2]
			p[i] = ans

print(ans % (10**9+7))