N,M=map(int,input().split())
K=10**9+7
"""la=[]
for i in range(M):
    la.append(int(input()))"""
ldp=[0 for i in range(N)]
for i in range(M):
    a=int(input())
    ldp[a-1]=-1
if ldp[0]!=-1:
    ldp[0]=1
    #if ldp[1]!=-1:
    #    ldp[1]=1
if N>=1:
    if ldp[1]!=-1:
        ldp[1]+=1
        if ldp[0]!=-1:
            ldp[1]+=1

if N>=2:
    for i in range(2,N):
        if ldp[i]!=-1:
            if ldp[i-1]!=-1:
                ldp[i]=(ldp[i]+ldp[i-1])%K
            if ldp[i-2]!=-1:
                ldp[i]=(ldp[i]+ldp[i-2])%K
#print(ldp)
print(ldp[N-1])
