mod = 1000000007
dp=[]
def countways(n,broken,index):
	global dp
	if(dp[index]!=-1):
		return dp[index]

	ways = 0
	if(index+1<=n and broken[index+1]==0):
		ways+=countways(n,broken,index+1)
	if(index+2<=n and broken[index+2]==0):
		ways+=countways(n,broken,index+2)
	dp[index]=(ways%mod)
	return dp[index]

n,m = list(map(int,input().split()))
dp = [-1 for i in range(n+1)]
dp[n] = 1
broken = [0 for i in range(n+1)]
for i in range(m):
	broken[int(input())]=1
print(countways(n,broken,0)%mod)