lis=list(map(int,input().split()))
alist=[]
for i in range(lis[1]):
    alist.append(int(input()))
flag=0
ans=0
steps=[0]*(lis[0]+1)
if 1 in alist:
    steps[1]=0
    steps[2]=1
elif 2 in alist:
    steps[1]=1
    steps[2]=0
else:
    steps[1]=1
    steps[2]=2
for i in range(3,lis[0]+1):
    if i not in alist:
        steps[i]=(steps[i-1]+steps[i-2])%((10**9)+7)
ans=steps[-1]

print(ans)
