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