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

A = [int(input()) for _ in range(m)]

a0 = 1
a1 = 1 if A[0] !=1 else 0
mod = 1e9+7

ANS=[0]*(n+1)
ANS[0]=a0
ANS[1]=a1
Next = A if a1 !=0 else A[1:]
next = 0
for i in range(2, n+1):
    if next <= len(Next)-1:
        if i == Next[next]:
            ANS[i] = 0
            next += 1
            continue
    ANS[i] = ANS[i-2] + ANS[i-1]

print(int(ANS[n]%mod))
