N, M = map(int, input().split())
A = []
for i in range(M):
	curr = int(input())
	A.append(curr)

mod = 1000000007

ans = [0] * (N + 1)

ans[0] = 1

for i in range(len(ans)):
	if i in A:
		continue
	if(i+1 < len(ans)):
		ans[i+1] += ans[i]
		ans[i+1] %= mod
	if(i+2 < len(ans)):
		ans[i+2] += ans[i]
		ans[i+2] %=mod

print(ans[N])