N,M=map(int,input().split())
a=list(int(input()) for _ in range(M) )
ans=0
ansn1=0
ansn2=0
mod=1000000007
for i in range(N):
    if i==0:
        if i+1 not in a:
            ans=1
            ansn2 = 0
            ansn1=ans

    elif i==1:
        if i+1 not in a:
            ans=1+ansn1
            ansn2 = ansn1
            ansn1=ans
        else:
            ans=0
            ansn2=ansn1
            ansn1=ans

    elif i+1 not in a:
        ans=(ansn1+ansn2)%mod
        ansn2 = ansn1
        ansn1=ans

    else:
        ans=0
        ansn2 = ansn1
        ansn1=ans

print(ans)
