dp = [0 for i in range(10**5 + 10)]
dp[0] = 1
n, m = map(int, raw_input().split())
dont = [0 for i in range(10**5 + 10)]
l = [input() for i in range(m)]
for i in l:
	dont[i] = 1
mod = 10**9 + 7
for i in range(1, n+1):
	if dont[i]:
		continue
	dp[i] = dp[i-1] + dp[i-2]
	dp[i] %= mod
print dp[n]