N,M = map(int,input().split())
A = [int(input()) for _ in range(M)]
B = [0]*(N+10)
B[0]=1
a=0
for i in range(1,N+1):
    if i==1:
        if A[a]==1:
            B[1]=0
            a+=1
        else:
            B[i]=1
    else:
        if A[a]==i:
            B[i] = 0
            a+=1
            if a==len(A):
                a-=1
        else:
            B[i] += B[i-1]+B[i-2]
            B[i] %= (10**9+7)
print(B[N]%(10**9+7))