n,m = map(int,input().split(" "))
a=[]
mod = 10 ** 9 + 7
for i in range(m):
    a.append(int(input()))

dp = [0] * (n+1)
for j in range(n+1):
    if j in a:
        dp[j] = 0
    elif j == 1 or j == 0:
        dp[j] = 1
    else:
        dp[j] = (dp[j-1] + dp[j-2]) % mod

print(dp[n])
