n,m = map(int,input().split())
L =  [] 
for i in range(m):
    L.append(int(input()))
print(L)
mod = 10**9+7
dp = [0]*(n+1)
dp[0]= 1
dp[1] = 1
#dp[2] = 2
for i in range(1,n+1):
    if 1 in L:
        dp[1] = 0
    if i in L:
        continue
    else:
        if i <= 1:
            dp[i] = dp[i-1]
        elif i>=2 :
            dp[i] = dp[i-1]+ dp[i-2]
        #print(dp)
print(dp[n]%mod)