n, m = map(int, input().split())
As = [int(input()) for i in range(m)]


dp = [0] * (n+1)
mod = 10**9 + 7
# 配るdp ではなくもらうdpで書くようにしてみる

for i in range(n+1):
    if i == 0:
        dp[i] = 1

    elif i in As:
        dp[i] = 0
    elif i == 1:
        dp[i] = dp[i-1]
    else:
        dp[i] = (dp[i-1] % mod + dp[i-2] % mod) % mod
    


print(dp[n])
