p=1000000007
n,m=map(int,input().split())

# 0段目
dp=[1] * (n +1)
broken=[0] * (n +1)

for i in range(m):
    a= int(input())
    broken[a] = 1

# 最後の２段は１個定
for i in range(n-2,-1,-1):
    if broken[i]:
        dp[i]=0
        continue

    dp[i] = (dp[i+1] + dp[i+2]) %p

print(dp[0])
