n,m = map(int,input().split())

list1 = []
for i in range(m):
    list1.append(int(input()))

dp = [0]*(n+1)
dp[0] = 1
if not 1 in list1: 
	dp[1] = 1 #i+2まで考えるため、初期設定はi = 1まで必要
for i in range(n-1):
	if (i in list1)and (i+1 in list1):
		break
	if i in list1 :
		dp[i+2] = dp[i+1]
	elif i+1 in list1:
		dp[i+2] = dp[i]
	else:
		dp[i+2] = dp[i] + dp[i + 1]

print(dp[n]%1000000007)

