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