mod=10**9+7
n,m=map(int,input().split())
A=[int(input()) for _ in range(m)]
A=list(set(A))
A.sort()
DP=[0]*(n+1)
DP[0]=1
if A:
    j=0
    if A[0]!=1:
        DP[1]=1
    else:
        j+=1
    for i in range(2,n+1):
        if i==A[j]:
            if j<len(A)-1:
                j+=1
        else:
            DP[i]=DP[i-1]+DP[i-2]
            DP[i]%=mod
    print(DP[-1])
else:
    DP[1]=1
    for i in range(2,n+1):
        DP[i]=DP[i-1]+DP[i-2]
        DP[i]%=mod
    print(DP[-1])