n,m = map(int,input().split())
dp = [1]*(n+1) 
dp[1] = 2
mod = 10**9 + 7
for i in range(m):
    a = int(input())
    dp[a-1] = 0
if dp[0] == 0:
    dp[1] =1

for i in range(1,n+1):
    if dp[i] == 0:
        continue
    else:
        if i == 1:
            dp[i] = dp[i-1] +1
        else:
            dp[i] = (dp[i-1] + dp[i-2])%mod
        #print(dp)
print(dp[n-1])