n,m = map(int,raw_input().split())
a = {}
for i in xrange(m):
	step = int(raw_input())
	a[step] = 1
dp = [1]*(n+1)
mod = 10**9+7
for i in xrange(1,n+1):
	if i in a:
		dp[i] = 0
	elif i == 1:
		dp[i] = 1
	else:
		dp[i] = dp[i-1] + dp[i-2]
print dp[n]%mod